VERSION 5.00
Object = "{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}#1.1#0"; "ieframe.dll"
Object = "{8E27C92E-1264-101C-8A2F-040224009C02}#7.0#0"; "MSCAL.OCX"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Object = "{648A5603-2C6E-101B-82B6-000000000014}#1.1#0"; "MSCOMM32.OCX"
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Object = "{248DD890-BB45-11CF-9ABC-0080C7E7B78D}#1.0#0"; "MSWINSCK.OCX"
Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX"
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form frmShip 
   BackColor       =   &H8000000B&
   BorderStyle     =   0  'None
   Caption         =   "FSMS Client v720.3.1"
   ClientHeight    =   9000
   ClientLeft      =   795
   ClientTop       =   1245
   ClientWidth     =   12000
   Icon            =   "frmShip.frx":0000
   KeyPreview      =   -1  'True
   LinkTopic       =   "Form1"
   ScaleHeight     =   1200
   ScaleMode       =   0  'User
   ScaleWidth      =   800
   StartUpPosition =   2  'CenterScreen
   WhatsThisButton =   -1  'True
   WhatsThisHelp   =   -1  'True
   Begin VB.Timer Timer2 
      Interval        =   3000
      Left            =   0
      Top             =   0
   End
   Begin FSMSClient.FSMSQuote FSMSQuote1 
      Height          =   495
      Left            =   1320
      TabIndex        =   379
      Top             =   0
      Visible         =   0   'False
      Width           =   555
      _ExtentX        =   979
      _ExtentY        =   873
   End
   Begin VB.CommandButton cmdMenu 
      Appearance      =   0  'Flat
      BackColor       =   &H00E0E0E0&
      Caption         =   "Rate (F11)"
      Height          =   320
      Index           =   5
      Left            =   6000
      MaskColor       =   &H0080C0FF&
      Style           =   1  'Graphical
      TabIndex        =   242
      TabStop         =   0   'False
      Top             =   8430
      UseMaskColor    =   -1  'True
      Width           =   1200
   End
   Begin VB.CommandButton cmdCustom 
      Appearance      =   0  'Flat
      BackColor       =   &H00C0E0FF&
      Caption         =   "Custom 3 (F4)"
      Height          =   320
      Index           =   3
      Left            =   10800
      MaskColor       =   &H0080C0FF&
      Style           =   1  'Graphical
      TabIndex        =   237
      TabStop         =   0   'False
      Top             =   8430
      UseMaskColor    =   -1  'True
      Width           =   1200
   End
   Begin VB.CommandButton cmdCustom 
      Appearance      =   0  'Flat
      BackColor       =   &H00C0E0FF&
      Caption         =   "Custom 2 (F3)"
      Height          =   320
      Index           =   2
      Left            =   9600
      MaskColor       =   &H0080C0FF&
      Style           =   1  'Graphical
      TabIndex        =   236
      TabStop         =   0   'False
      Top             =   8430
      UseMaskColor    =   -1  'True
      Width           =   1200
   End
   Begin VB.CommandButton cmdCustom 
      Appearance      =   0  'Flat
      BackColor       =   &H00C0E0FF&
      Caption         =   "Custom 1 (F2)"
      Height          =   320
      Index           =   1
      Left            =   8400
      MaskColor       =   &H0080C0FF&
      Style           =   1  'Graphical
      TabIndex        =   235
      TabStop         =   0   'False
      Top             =   8430
      UseMaskColor    =   -1  'True
      Width           =   1200
   End
   Begin VB.CommandButton cmdMenu 
      Appearance      =   0  'Flat
      BackColor       =   &H00E0E0E0&
      Caption         =   "Close (F7)"
      Height          =   320
      Index           =   2
      Left            =   2400
      MaskColor       =   &H0080C0FF&
      Style           =   1  'Graphical
      TabIndex        =   234
      TabStop         =   0   'False
      Top             =   8430
      UseMaskColor    =   -1  'True
      Width           =   1200
   End
   Begin VB.CommandButton cmdMenu 
      Appearance      =   0  'Flat
      BackColor       =   &H00E0E0E0&
      Caption         =   "Delete (F6)"
      Height          =   320
      Index           =   1
      Left            =   1200
      MaskColor       =   &H0080C0FF&
      Style           =   1  'Graphical
      TabIndex        =   233
      TabStop         =   0   'False
      Top             =   8430
      UseMaskColor    =   -1  'True
      Width           =   1200
   End
   Begin VB.CommandButton cmdMenu 
      Appearance      =   0  'Flat
      BackColor       =   &H00E0E0E0&
      Caption         =   "Ref Track (F9)"
      Enabled         =   0   'False
      Height          =   320
      Index           =   4
      Left            =   4800
      MaskColor       =   &H0080C0FF&
      Style           =   1  'Graphical
      TabIndex        =   232
      TabStop         =   0   'False
      ToolTipText     =   "Track by Reference"
      Top             =   8430
      UseMaskColor    =   -1  'True
      Width           =   1200
   End
   Begin VB.CommandButton cmdMenu 
      Appearance      =   0  'Flat
      BackColor       =   &H00E0E0E0&
      Caption         =   "Track (F8)"
      Enabled         =   0   'False
      Height          =   320
      Index           =   3
      Left            =   3600
      MaskColor       =   &H0080C0FF&
      Style           =   1  'Graphical
      TabIndex        =   231
      TabStop         =   0   'False
      ToolTipText     =   "Track by Tracking Number"
      Top             =   8430
      UseMaskColor    =   -1  'True
      Width           =   1200
   End
   Begin VB.CommandButton cmdMenu 
      Appearance      =   0  'Flat
      BackColor       =   &H00E0E0E0&
      Caption         =   "Ship (F12)"
      Height          =   320
      Index           =   6
      Left            =   7200
      MaskColor       =   &H0080C0FF&
      Style           =   1  'Graphical
      TabIndex        =   230
      TabStop         =   0   'False
      Top             =   8430
      UseMaskColor    =   -1  'True
      Width           =   1200
   End
   Begin VB.CommandButton cmdMenu 
      Appearance      =   0  'Flat
      BackColor       =   &H00C0E0FF&
      Caption         =   "Clear (F5)"
      Height          =   320
      Index           =   0
      Left            =   0
      MaskColor       =   &H0080C0FF&
      Style           =   1  'Graphical
      TabIndex        =   229
      TabStop         =   0   'False
      Top             =   8430
      UseMaskColor    =   -1  'True
      Width           =   1200
   End
   Begin VB.Timer Timer1 
      Interval        =   500
      Left            =   -240
      Top             =   -300
   End
   Begin MSCommLib.MSComm MSComm1 
      Left            =   240
      Top             =   -420
      _ExtentX        =   1005
      _ExtentY        =   1005
      _Version        =   393216
      DTREnable       =   -1  'True
   End
   Begin MSWinsockLib.Winsock wscFXRS 
      Left            =   840
      Top             =   -300
      _ExtentX        =   741
      _ExtentY        =   741
      _Version        =   393216
   End
   Begin MSComctlLib.StatusBar StatusBar1 
      Align           =   2  'Align Bottom
      Height          =   255
      Left            =   0
      TabIndex        =   138
      Top             =   8745
      Width           =   12000
      _ExtentX        =   21167
      _ExtentY        =   450
      _Version        =   393216
      BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628} 
         NumPanels       =   5
         BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            AutoSize        =   1
            Object.Width           =   5397
            MinWidth        =   4762
         EndProperty
         BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Object.Width           =   5821
            MinWidth        =   5821
         EndProperty
         BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Object.Width           =   5821
            MinWidth        =   5821
         EndProperty
         BeginProperty Panel4 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Style           =   5
            Alignment       =   1
            AutoSize        =   2
            Object.Width           =   1984
            MinWidth        =   1984
            TextSave        =   "2:50 PM"
         EndProperty
         BeginProperty Panel5 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Style           =   6
            Alignment       =   1
            AutoSize        =   2
            Object.Width           =   1984
            MinWidth        =   1984
            TextSave        =   "5/6/2013"
         EndProperty
      EndProperty
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin TabDlg.SSTab SSTab1 
      Height          =   7815
      Left            =   0
      TabIndex        =   139
      Top             =   600
      Width           =   12015
      _ExtentX        =   21193
      _ExtentY        =   13785
      _Version        =   393216
      Tabs            =   6
      TabsPerRow      =   6
      TabHeight       =   529
      BackColor       =   -2147483638
      TabCaption(0)   =   "Ship"
      TabPicture(0)   =   "frmShip.frx":030A
      Tab(0).ControlEnabled=   -1  'True
      Tab(0).Control(0)=   "fraScreens(0)"
      Tab(0).Control(0).Enabled=   0   'False
      Tab(0).ControlCount=   1
      TabCaption(1)   =   "International"
      TabPicture(1)   =   "frmShip.frx":0326
      Tab(1).ControlEnabled=   0   'False
      Tab(1).Control(0)=   "fraScreens(1)"
      Tab(1).ControlCount=   1
      TabCaption(2)   =   "Batch"
      TabPicture(2)   =   "frmShip.frx":0342
      Tab(2).ControlEnabled=   0   'False
      Tab(2).Control(0)=   "fraScreens(2)"
      Tab(2).ControlCount=   1
      TabCaption(3)   =   "Service Quote"
      TabPicture(3)   =   "frmShip.frx":035E
      Tab(3).ControlEnabled=   0   'False
      Tab(3).Control(0)=   "fraScreens(4)"
      Tab(3).ControlCount=   1
      TabCaption(4)   =   "Shipping History"
      TabPicture(4)   =   "frmShip.frx":037A
      Tab(4).ControlEnabled=   0   'False
      Tab(4).Control(0)=   "fraScreens(3)"
      Tab(4).ControlCount=   1
      TabCaption(5)   =   "Fedex.com"
      TabPicture(5)   =   "frmShip.frx":0396
      Tab(5).ControlEnabled=   0   'False
      Tab(5).Control(0)=   "WebBrowser1"
      Tab(5).ControlCount=   1
      Begin VB.Frame fraScreens 
         BackColor       =   &H00FFFFFF&
         BorderStyle     =   0  'None
         Caption         =   "Frame1"
         Height          =   7440
         Index           =   3
         Left            =   -74985
         TabIndex        =   220
         Top             =   315
         Width           =   11940
         Begin MSAdodcLib.Adodc dcShipments 
            Height          =   330
            Left            =   360
            Top             =   7080
            Visible         =   0   'False
            Width           =   1995
            _ExtentX        =   3519
            _ExtentY        =   582
            ConnectMode     =   0
            CursorLocation  =   3
            IsolationLevel  =   -1
            ConnectionTimeout=   15
            CommandTimeout  =   30
            CursorType      =   3
            LockType        =   3
            CommandType     =   8
            CursorOptions   =   0
            CacheSize       =   50
            MaxRecords      =   0
            BOFAction       =   0
            EOFAction       =   0
            ConnectStringType=   1
            Appearance      =   1
            BackColor       =   -2147483643
            ForeColor       =   -2147483640
            Orientation     =   0
            Enabled         =   -1
            Connect         =   ""
            OLEDBString     =   ""
            OLEDBFile       =   ""
            DataSourceName  =   ""
            OtherAttributes =   ""
            UserName        =   ""
            Password        =   ""
            RecordSource    =   ""
            Caption         =   "Adodc1"
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            _Version        =   393216
         End
         Begin VB.CommandButton cmdSearch 
            Appearance      =   0  'Flat
            BackColor       =   &H00E0E0E0&
            Caption         =   "Search"
            Height          =   315
            Left            =   6600
            MaskColor       =   &H0080C0FF&
            Style           =   1  'Graphical
            TabIndex        =   372
            Top             =   960
            UseMaskColor    =   -1  'True
            Width           =   960
         End
         Begin MSACAL.Calendar Calendar3 
            Height          =   255
            Left            =   300
            TabIndex        =   221
            TabStop         =   0   'False
            Top             =   420
            Visible         =   0   'False
            Width           =   255
            _Version        =   524288
            _ExtentX        =   450
            _ExtentY        =   450
            _StockProps     =   1
            BackColor       =   16777215
            Year            =   2004
            Month           =   2
            Day             =   9
            DayLength       =   1
            MonthLength     =   2
            DayFontColor    =   0
            FirstDay        =   1
            GridCellEffect  =   1
            GridFontColor   =   10485760
            GridLinesColor  =   -2147483632
            ShowDateSelectors=   -1  'True
            ShowDays        =   -1  'True
            ShowHorizontalGrid=   -1  'True
            ShowTitle       =   0   'False
            ShowVerticalGrid=   -1  'True
            TitleFontColor  =   10485760
            ValueIsNull     =   -1  'True
            BeginProperty DayFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Arial"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            BeginProperty GridFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Arial"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            BeginProperty TitleFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Arial"
               Size            =   12.01
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
         End
         Begin VB.TextBox txtSearchValue 
            Height          =   315
            Left            =   4440
            TabIndex        =   371
            Top             =   960
            Width           =   2055
         End
         Begin VB.ComboBox cboSearchField 
            Height          =   315
            Left            =   1560
            Style           =   2  'Dropdown List
            TabIndex        =   370
            Top             =   960
            Width           =   1695
         End
         Begin VB.TextBox txtShipDate 
            Height          =   315
            Left            =   1560
            TabIndex        =   368
            Top             =   480
            Width           =   975
         End
         Begin VB.Frame Frame2 
            BackColor       =   &H00FFFFFF&
            BorderStyle     =   0  'None
            Height          =   315
            Left            =   8280
            TabIndex        =   224
            Top             =   900
            Width           =   2895
            Begin VB.OptionButton optStatus 
               BackColor       =   &H00FFFFFF&
               Caption         =   "Shipped"
               Height          =   195
               Index           =   0
               Left            =   480
               TabIndex        =   377
               TabStop         =   0   'False
               Top             =   120
               Value           =   -1  'True
               Width           =   975
            End
            Begin VB.OptionButton optStatus 
               BackColor       =   &H00FFFFFF&
               Caption         =   "Deleted"
               Height          =   195
               Index           =   1
               Left            =   1440
               TabIndex        =   378
               TabStop         =   0   'False
               Top             =   120
               Width           =   1215
            End
         End
         Begin VB.Frame Frame3 
            BackColor       =   &H00FFFFFF&
            BorderStyle     =   0  'None
            Height          =   555
            Left            =   7680
            TabIndex        =   223
            Top             =   300
            Width           =   4095
            Begin VB.OptionButton optType 
               BackColor       =   &H00FFFFFF&
               Caption         =   "IPD"
               Height          =   195
               Index           =   3
               Left            =   2880
               TabIndex        =   376
               TabStop         =   0   'False
               Top             =   240
               Width           =   615
            End
            Begin VB.OptionButton optType 
               BackColor       =   &H00FFFFFF&
               Caption         =   "Express"
               Height          =   195
               Index           =   0
               Left            =   120
               TabIndex        =   373
               TabStop         =   0   'False
               Top             =   240
               Width           =   855
            End
            Begin VB.OptionButton optType 
               BackColor       =   &H00FFFFFF&
               Caption         =   "Ground"
               Height          =   195
               Index           =   1
               Left            =   1080
               TabIndex        =   374
               TabStop         =   0   'False
               Top             =   240
               Width           =   855
            End
            Begin VB.OptionButton optType 
               BackColor       =   &H00FFFFFF&
               Caption         =   "Int'l"
               Height          =   195
               Index           =   2
               Left            =   2040
               TabIndex        =   375
               TabStop         =   0   'False
               Top             =   240
               Width           =   615
            End
         End
         Begin VB.ComboBox cboLocationName 
            Height          =   315
            Index           =   1
            Left            =   4440
            TabIndex        =   369
            Top             =   480
            Width           =   3135
         End
         Begin MSDataGridLib.DataGrid grdShipments 
            Height          =   5295
            Left            =   360
            TabIndex        =   222
            ToolTipText     =   "Double-click a row to Delete a package. To Delete multiple packages, hold down CTRL, click the rows and click Delete."
            Top             =   1800
            Width           =   11175
            _ExtentX        =   19711
            _ExtentY        =   9340
            _Version        =   393216
            AllowUpdate     =   0   'False
            Enabled         =   0   'False
            HeadLines       =   2
            RowHeight       =   15
            BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ColumnCount     =   2
            BeginProperty Column00 
               DataField       =   ""
               Caption         =   ""
               BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
                  Type            =   0
                  Format          =   ""
                  HaveTrueFalseNull=   0
                  FirstDayOfWeek  =   0
                  FirstWeekOfYear =   0
                  LCID            =   1033
                  SubFormatType   =   0
               EndProperty
            EndProperty
            BeginProperty Column01 
               DataField       =   ""
               Caption         =   ""
               BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
                  Type            =   0
                  Format          =   ""
                  HaveTrueFalseNull=   0
                  FirstDayOfWeek  =   0
                  FirstWeekOfYear =   0
                  LCID            =   1033
                  SubFormatType   =   0
               EndProperty
            EndProperty
            SplitCount      =   1
            BeginProperty Split0 
               BeginProperty Column00 
               EndProperty
               BeginProperty Column01 
               EndProperty
            EndProperty
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Value:"
            Height          =   255
            Index           =   46
            Left            =   3480
            TabIndex        =   287
            Top             =   1020
            Width           =   855
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Search:"
            Height          =   255
            Index           =   45
            Left            =   600
            TabIndex        =   286
            Top             =   1020
            Width           =   855
         End
         Begin VB.Label Label53 
            BackColor       =   &H00FFFFFF&
            Caption         =   "View Parameters"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H000080FF&
            Height          =   255
            Left            =   360
            TabIndex        =   228
            Top             =   135
            Width           =   2775
         End
         Begin VB.Line Line1 
            BorderColor     =   &H000080FF&
            BorderWidth     =   2
            Index           =   18
            X1              =   360
            X2              =   11520
            Y1              =   120
            Y2              =   120
         End
         Begin VB.Line Line1 
            BorderColor     =   &H000080FF&
            BorderWidth     =   2
            Index           =   19
            X1              =   360
            X2              =   11520
            Y1              =   1440
            Y2              =   1440
         End
         Begin VB.Label lblShipmentsView 
            BackColor       =   &H00FFFFFF&
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H000080FF&
            Height          =   255
            Left            =   360
            TabIndex        =   227
            Top             =   1455
            Width           =   3015
         End
         Begin VB.Image Image4 
            Height          =   345
            Left            =   2640
            Picture         =   "frmShip.frx":03B2
            Stretch         =   -1  'True
            Top             =   480
            Width           =   345
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Ship Date:"
            Height          =   255
            Index           =   44
            Left            =   600
            TabIndex        =   226
            Top             =   540
            Width           =   855
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Location:"
            Height          =   255
            Index           =   43
            Left            =   3360
            TabIndex        =   225
            Top             =   540
            Width           =   975
         End
      End
      Begin VB.Frame fraScreens 
         BackColor       =   &H00FFFFFF&
         BorderStyle     =   0  'None
         Caption         =   "2340"
         Height          =   7440
         Index           =   4
         Left            =   -74985
         TabIndex        =   245
         Top             =   315
         Width           =   11940
         Begin VB.ComboBox cboLocationName 
            Height          =   315
            Index           =   2
            Left            =   2160
            TabIndex        =   382
            Top             =   5340
            Width           =   3135
         End
         Begin VB.TextBox f60 
            Alignment       =   1  'Right Justify
            Height          =   315
            Index           =   1
            Left            =   10440
            TabIndex        =   342
            TabStop         =   0   'False
            Top             =   3780
            Width           =   615
         End
         Begin VB.TextBox f60 
            Alignment       =   1  'Right Justify
            Height          =   315
            Index           =   0
            Left            =   10440
            TabIndex        =   341
            TabStop         =   0   'False
            Top             =   3420
            Width           =   615
         End
         Begin VB.Frame fraShowType 
            BackColor       =   &H00FFFFFF&
            BorderStyle     =   0  'None
            Caption         =   "Frame4"
            Height          =   495
            Left            =   2040
            TabIndex        =   336
            Top             =   4320
            Width           =   5475
            Begin VB.OptionButton optRate 
               BackColor       =   &H00FFFFFF&
               Caption         =   "Show List Rates"
               Height          =   315
               Index           =   1
               Left            =   3120
               TabIndex        =   338
               Top             =   120
               Width           =   1815
            End
            Begin VB.OptionButton optRate 
               BackColor       =   &H00FFFFFF&
               Caption         =   "Show Discounted Rates"
               Height          =   315
               Index           =   0
               Left            =   300
               TabIndex        =   337
               Top             =   120
               Width           =   2535
            End
         End
         Begin VB.Frame fraFHD 
            BackColor       =   &H00FFFFFF&
            Caption         =   "FHD Special"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H000080FF&
            Height          =   1815
            Left            =   9720
            TabIndex        =   309
            Top             =   5340
            Width           =   1575
            Begin VB.CheckBox chkSIG 
               BackColor       =   &H00FFFFFF&
               Caption         =   "SIG"
               BeginProperty Font 
                  Name            =   "MS Sans Serif"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   700
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Height          =   255
               Left            =   360
               TabIndex        =   364
               ToolTipText     =   "Signature Service"
               Top             =   300
               Width           =   735
            End
            Begin VB.CheckBox chkFHDSpecial 
               BackColor       =   &H00FFFFFF&
               Caption         =   "DC"
               BeginProperty Font 
                  Name            =   "MS Sans Serif"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   700
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Height          =   255
               Index           =   1
               Left            =   360
               TabIndex        =   365
               ToolTipText     =   "Date Certain"
               Top             =   660
               Width           =   735
            End
            Begin VB.CheckBox chkFHDSpecial 
               BackColor       =   &H00FFFFFF&
               Caption         =   "AD"
               BeginProperty Font 
                  Name            =   "MS Sans Serif"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   700
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Height          =   255
               Index           =   3
               Left            =   360
               TabIndex        =   367
               ToolTipText     =   "Appointment Delivery"
               Top             =   1380
               Width           =   735
            End
            Begin VB.CheckBox chkFHDSpecial 
               BackColor       =   &H00FFFFFF&
               Caption         =   "ED"
               BeginProperty Font 
                  Name            =   "MS Sans Serif"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   700
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Height          =   255
               Index           =   2
               Left            =   360
               TabIndex        =   366
               ToolTipText     =   "Evening Delivery"
               Top             =   1020
               Width           =   735
            End
         End
         Begin VB.Frame fraGR 
            BackColor       =   &H00FFFFFF&
            Caption         =   "Ground/FHD"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H000080FF&
            Height          =   1815
            Left            =   7920
            TabIndex        =   308
            Top             =   5340
            Width           =   1575
            Begin VB.CheckBox chkNonSP 
               BackColor       =   &H00FFFFFF&
               Caption         =   "NON-SP"
               BeginProperty Font 
                  Name            =   "MS Sans Serif"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   700
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Height          =   255
               Left            =   360
               TabIndex        =   363
               ToolTipText     =   "Non-Standard Packaging"
               Top             =   1020
               Width           =   1095
            End
            Begin VB.CheckBox chkAOD 
               BackColor       =   &H00FFFFFF&
               Caption         =   "AOD"
               BeginProperty Font 
                  Name            =   "MS Sans Serif"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   700
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Height          =   255
               Left            =   360
               TabIndex        =   361
               ToolTipText     =   "Acknowledgement of Delivery"
               Top             =   300
               Width           =   975
            End
            Begin VB.CheckBox chkAPOD 
               BackColor       =   &H00FFFFFF&
               Caption         =   "APOD"
               BeginProperty Font 
                  Name            =   "MS Sans Serif"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   700
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Height          =   255
               Left            =   360
               TabIndex        =   362
               ToolTipText     =   "Auto Proof of Delivery"
               Top             =   660
               Width           =   1095
            End
         End
         Begin VB.Frame fraSpcl 
            BackColor       =   &H00FFFFFF&
            Caption         =   "Special Svcs"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H000080FF&
            Height          =   1815
            Left            =   6120
            TabIndex        =   307
            Top             =   5340
            Width           =   1575
            Begin VB.CheckBox chkRES 
               BackColor       =   &H00FFFFFF&
               Caption         =   "RES"
               BeginProperty Font 
                  Name            =   "MS Sans Serif"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   700
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Height          =   255
               Left            =   360
               TabIndex        =   360
               ToolTipText     =   "Residential Address"
               Top             =   1020
               Width           =   735
            End
            Begin VB.CheckBox chkSAT 
               BackColor       =   &H00FFFFFF&
               Caption         =   "SAT"
               BeginProperty Font 
                  Name            =   "MS Sans Serif"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   700
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Height          =   255
               Left            =   360
               TabIndex        =   358
               ToolTipText     =   "Saturday Delivery"
               Top             =   300
               Width           =   735
            End
            Begin VB.CheckBox chkCOD 
               BackColor       =   &H00FFFFFF&
               Caption         =   "COD"
               BeginProperty Font 
                  Name            =   "MS Sans Serif"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   700
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Height          =   255
               Left            =   360
               TabIndex        =   359
               Top             =   660
               Width           =   735
            End
         End
         Begin VB.ComboBox cboBoxName 
            Height          =   315
            Index           =   1
            Left            =   3840
            TabIndex        =   357
            Top             =   6840
            Visible         =   0   'False
            Width           =   1335
         End
         Begin VB.TextBox f59 
            Height          =   315
            Index           =   1
            Left            =   3360
            TabIndex        =   356
            Top             =   6840
            Width           =   375
         End
         Begin VB.TextBox f58 
            Height          =   315
            Index           =   1
            Left            =   2760
            TabIndex        =   355
            Top             =   6840
            Width           =   375
         End
         Begin VB.TextBox f57 
            Height          =   315
            Index           =   1
            Left            =   2160
            TabIndex        =   354
            Top             =   6840
            Width           =   375
         End
         Begin VB.TextBox txtDV 
            Height          =   315
            Left            =   2160
            TabIndex        =   353
            Top             =   6480
            Width           =   735
         End
         Begin VB.TextBox txtDetails 
            Alignment       =   1  'Right Justify
            Height          =   315
            Index           =   6
            Left            =   10440
            TabIndex        =   294
            TabStop         =   0   'False
            Top             =   2820
            Width           =   975
         End
         Begin VB.TextBox txtDetails 
            Alignment       =   1  'Right Justify
            Height          =   315
            Index           =   5
            Left            =   10440
            TabIndex        =   293
            TabStop         =   0   'False
            Top             =   2460
            Width           =   975
         End
         Begin VB.TextBox txtDetails 
            Alignment       =   1  'Right Justify
            Height          =   315
            Index           =   4
            Left            =   10440
            TabIndex        =   292
            TabStop         =   0   'False
            Top             =   2100
            Width           =   975
         End
         Begin VB.TextBox txtDetails 
            Alignment       =   1  'Right Justify
            Height          =   315
            Index           =   3
            Left            =   10440
            TabIndex        =   291
            TabStop         =   0   'False
            Top             =   1740
            Width           =   975
         End
         Begin VB.TextBox txtDetails 
            Alignment       =   1  'Right Justify
            Height          =   315
            Index           =   2
            Left            =   10440
            TabIndex        =   290
            TabStop         =   0   'False
            Top             =   1380
            Width           =   975
         End
         Begin VB.TextBox txtDetails 
            Alignment       =   1  'Right Justify
            Height          =   315
            Index           =   1
            Left            =   10440
            TabIndex        =   289
            TabStop         =   0   'False
            Top             =   1020
            Width           =   975
         End
         Begin VB.TextBox txtNumPkgs 
            Height          =   315
            Left            =   2160
            Locked          =   -1  'True
            TabIndex        =   351
            Text            =   "1"
            ToolTipText     =   "Currently only single piece shipments are supported"
            Top             =   6120
            Width           =   735
         End
         Begin VB.TextBox txtWeight 
            Height          =   315
            Left            =   5040
            TabIndex        =   352
            Top             =   6120
            Width           =   735
         End
         Begin VB.TextBox txtDestZip 
            Height          =   315
            Left            =   5040
            TabIndex        =   350
            Top             =   5760
            Width           =   735
         End
         Begin VB.ComboBox cboDestState 
            Height          =   315
            Left            =   2160
            TabIndex        =   349
            Top             =   5760
            Width           =   2175
         End
         Begin VB.Frame fraRate 
            BackColor       =   &H00FFFFFF&
            BorderStyle     =   0  'None
            Caption         =   "Frame4"
            Height          =   3735
            Index           =   0
            Left            =   0
            TabIndex        =   247
            Top             =   600
            Width           =   8115
            Begin VB.CommandButton cmdError 
               BackColor       =   &H00E0E0E0&
               Caption         =   "Error"
               Height          =   315
               Index           =   6
               Left            =   7080
               Style           =   1  'Graphical
               TabIndex        =   348
               Top             =   3180
               Visible         =   0   'False
               Width           =   975
            End
            Begin VB.CommandButton cmdError 
               BackColor       =   &H00E0E0E0&
               Caption         =   "Error"
               Height          =   315
               Index           =   5
               Left            =   7080
               Style           =   1  'Graphical
               TabIndex        =   347
               Top             =   2640
               Visible         =   0   'False
               Width           =   975
            End
            Begin VB.CommandButton cmdError 
               BackColor       =   &H00E0E0E0&
               Caption         =   "Error"
               Height          =   315
               Index           =   4
               Left            =   7080
               Style           =   1  'Graphical
               TabIndex        =   346
               Top             =   2100
               Visible         =   0   'False
               Width           =   975
            End
            Begin VB.CommandButton cmdError 
               BackColor       =   &H00E0E0E0&
               Caption         =   "Error"
               Height          =   315
               Index           =   3
               Left            =   7080
               Style           =   1  'Graphical
               TabIndex        =   345
               Top             =   1560
               Visible         =   0   'False
               Width           =   975
            End
            Begin VB.CommandButton cmdError 
               BackColor       =   &H00E0E0E0&
               Caption         =   "Error"
               Height          =   315
               Index           =   2
               Left            =   7080
               Style           =   1  'Graphical
               TabIndex        =   344
               Top             =   1020
               Visible         =   0   'False
               Width           =   975
            End
            Begin VB.CommandButton cmdError 
               BackColor       =   &H00E0E0E0&
               Caption         =   "Error"
               Height          =   315
               Index           =   1
               Left            =   7080
               Style           =   1  'Graphical
               TabIndex        =   343
               Top             =   480
               Visible         =   0   'False
               Width           =   975
            End
            Begin VB.TextBox f409 
               Alignment       =   1  'Right Justify
               Height          =   315
               Index           =   6
               Left            =   4560
               TabIndex        =   266
               TabStop         =   0   'False
               Top             =   3180
               Width           =   975
            End
            Begin VB.TextBox f409 
               Alignment       =   1  'Right Justify
               Height          =   315
               Index           =   5
               Left            =   4560
               TabIndex        =   264
               TabStop         =   0   'False
               Top             =   2640
               Width           =   975
            End
            Begin VB.TextBox txtDelTime 
               Alignment       =   1  'Right Justify
               Height          =   315
               Index           =   4
               Left            =   5760
               TabIndex        =   262
               TabStop         =   0   'False
               Top             =   2100
               Width           =   975
            End
            Begin VB.TextBox f409 
               Alignment       =   1  'Right Justify
               Height          =   315
               Index           =   4
               Left            =   4560
               TabIndex        =   261
               TabStop         =   0   'False
               Top             =   2100
               Width           =   975
            End
            Begin VB.TextBox txtDelTime 
               Alignment       =   1  'Right Justify
               Height          =   315
               Index           =   3
               Left            =   5760
               TabIndex        =   259
               TabStop         =   0   'False
               Top             =   1560
               Width           =   975
            End
            Begin VB.TextBox f409 
               Alignment       =   1  'Right Justify
               Height          =   315
               Index           =   3
               Left            =   4560
               TabIndex        =   258
               TabStop         =   0   'False
               Top             =   1560
               Width           =   975
            End
            Begin VB.TextBox txtDelTime 
               Alignment       =   1  'Right Justify
               Height          =   315
               Index           =   2
               Left            =   5760
               TabIndex        =   256
               TabStop         =   0   'False
               Top             =   1020
               Width           =   975
            End
            Begin VB.TextBox f409 
               Alignment       =   1  'Right Justify
               Height          =   315
               Index           =   2
               Left            =   4560
               TabIndex        =   255
               TabStop         =   0   'False
               Top             =   1020
               Width           =   975
            End
            Begin VB.TextBox txtDelTime 
               Alignment       =   1  'Right Justify
               Height          =   315
               Index           =   1
               Left            =   5760
               TabIndex        =   253
               TabStop         =   0   'False
               Top             =   480
               Width           =   975
            End
            Begin VB.TextBox f409 
               Alignment       =   1  'Right Justify
               Height          =   315
               Index           =   1
               Left            =   4560
               TabIndex        =   252
               TabStop         =   0   'False
               Top             =   480
               Width           =   975
            End
            Begin VB.TextBox f1599 
               Alignment       =   1  'Right Justify
               Height          =   315
               Index           =   1
               Left            =   3360
               TabIndex        =   335
               TabStop         =   0   'False
               Top             =   480
               Width           =   975
            End
            Begin VB.TextBox f1599 
               Alignment       =   1  'Right Justify
               Height          =   315
               Index           =   2
               Left            =   3360
               TabIndex        =   334
               TabStop         =   0   'False
               Top             =   1020
               Width           =   975
            End
            Begin VB.TextBox f1599 
               Alignment       =   1  'Right Justify
               Height          =   315
               Index           =   3
               Left            =   3360
               TabIndex        =   333
               TabStop         =   0   'False
               Top             =   1560
               Width           =   975
            End
            Begin VB.TextBox f1599 
               Alignment       =   1  'Right Justify
               Height          =   315
               Index           =   4
               Left            =   3360
               TabIndex        =   332
               TabStop         =   0   'False
               Top             =   2100
               Width           =   975
            End
            Begin VB.TextBox f1599 
               Alignment       =   1  'Right Justify
               Height          =   315
               Index           =   5
               Left            =   3360
               TabIndex        =   331
               TabStop         =   0   'False
               Top             =   2640
               Width           =   975
            End
            Begin VB.TextBox f1599 
               Alignment       =   1  'Right Justify
               Height          =   315
               Index           =   6
               Left            =   3360
               TabIndex        =   330
               TabStop         =   0   'False
               Top             =   3180
               Width           =   975
            End
            Begin VB.TextBox f1597 
               Alignment       =   1  'Right Justify
               Height          =   315
               Index           =   6
               Left            =   2160
               TabIndex        =   322
               TabStop         =   0   'False
               Top             =   3180
               Width           =   975
            End
            Begin VB.TextBox f1597 
               Alignment       =   1  'Right Justify
               Height          =   315
               Index           =   5
               Left            =   2160
               TabIndex        =   321
               TabStop         =   0   'False
               Top             =   2640
               Width           =   975
            End
            Begin VB.TextBox f1597 
               Alignment       =   1  'Right Justify
               Height          =   315
               Index           =   4
               Left            =   2160
               TabIndex        =   320
               TabStop         =   0   'False
               Top             =   2100
               Width           =   975
            End
            Begin VB.TextBox f1597 
               Alignment       =   1  'Right Justify
               Height          =   315
               Index           =   3
               Left            =   2160
               TabIndex        =   319
               TabStop         =   0   'False
               Top             =   1560
               Width           =   975
            End
            Begin VB.TextBox f1597 
               Alignment       =   1  'Right Justify
               Height          =   315
               Index           =   2
               Left            =   2160
               TabIndex        =   318
               TabStop         =   0   'False
               Top             =   1020
               Width           =   975
            End
            Begin VB.TextBox f1597 
               Alignment       =   1  'Right Justify
               Height          =   315
               Index           =   1
               Left            =   2160
               TabIndex        =   317
               TabStop         =   0   'False
               Top             =   480
               Width           =   975
            End
            Begin VB.TextBox f1528 
               Alignment       =   1  'Right Justify
               Height          =   315
               Index           =   6
               Left            =   960
               TabIndex        =   323
               TabStop         =   0   'False
               Top             =   3180
               Width           =   975
            End
            Begin VB.TextBox f1528 
               Alignment       =   1  'Right Justify
               Height          =   315
               Index           =   5
               Left            =   960
               TabIndex        =   324
               TabStop         =   0   'False
               Top             =   2640
               Width           =   975
            End
            Begin VB.TextBox f1528 
               Alignment       =   1  'Right Justify
               Height          =   315
               Index           =   4
               Left            =   960
               TabIndex        =   325
               TabStop         =   0   'False
               Top             =   2100
               Width           =   975
            End
            Begin VB.TextBox f1528 
               Alignment       =   1  'Right Justify
               Height          =   315
               Index           =   3
               Left            =   960
               TabIndex        =   326
               TabStop         =   0   'False
               Top             =   1560
               Width           =   975
            End
            Begin VB.TextBox f1528 
               Alignment       =   1  'Right Justify
               Height          =   315
               Index           =   2
               Left            =   960
               TabIndex        =   327
               TabStop         =   0   'False
               Top             =   1020
               Width           =   975
            End
            Begin VB.TextBox f1528 
               Alignment       =   1  'Right Justify
               Height          =   315
               Index           =   1
               Left            =   960
               TabIndex        =   328
               TabStop         =   0   'False
               Top             =   480
               Width           =   975
            End
            Begin VB.TextBox f1598 
               Alignment       =   1  'Right Justify
               Height          =   315
               Index           =   1
               Left            =   3360
               TabIndex        =   315
               TabStop         =   0   'False
               Top             =   480
               Width           =   975
            End
            Begin VB.TextBox f1598 
               Alignment       =   1  'Right Justify
               Height          =   315
               Index           =   2
               Left            =   3360
               TabIndex        =   314
               TabStop         =   0   'False
               Top             =   1020
               Width           =   975
            End
            Begin VB.TextBox f1598 
               Alignment       =   1  'Right Justify
               Height          =   315
               Index           =   3
               Left            =   3360
               TabIndex        =   313
               TabStop         =   0   'False
               Top             =   1560
               Width           =   975
            End
            Begin VB.TextBox f1598 
               Alignment       =   1  'Right Justify
               Height          =   315
               Index           =   4
               Left            =   3360
               TabIndex        =   312
               TabStop         =   0   'False
               Top             =   2100
               Width           =   975
            End
            Begin VB.TextBox f1598 
               Alignment       =   1  'Right Justify
               Height          =   315
               Index           =   5
               Left            =   3360
               TabIndex        =   311
               TabStop         =   0   'False
               Top             =   2640
               Width           =   975
            End
            Begin VB.TextBox f1598 
               Alignment       =   1  'Right Justify
               Height          =   315
               Index           =   6
               Left            =   3360
               TabIndex        =   310
               TabStop         =   0   'False
               Top             =   3180
               Width           =   975
            End
            Begin VB.TextBox f1596 
               Alignment       =   1  'Right Justify
               Height          =   315
               Index           =   1
               Left            =   2160
               TabIndex        =   278
               TabStop         =   0   'False
               Top             =   480
               Width           =   975
            End
            Begin VB.TextBox f1596 
               Alignment       =   1  'Right Justify
               Height          =   315
               Index           =   2
               Left            =   2160
               TabIndex        =   277
               TabStop         =   0   'False
               Top             =   1020
               Width           =   975
            End
            Begin VB.TextBox f1596 
               Alignment       =   1  'Right Justify
               Height          =   315
               Index           =   3
               Left            =   2160
               TabIndex        =   276
               TabStop         =   0   'False
               Top             =   1560
               Width           =   975
            End
            Begin VB.TextBox f1596 
               Alignment       =   1  'Right Justify
               Height          =   315
               Index           =   4
               Left            =   2160
               TabIndex        =   275
               TabStop         =   0   'False
               Top             =   2100
               Width           =   975
            End
            Begin VB.TextBox f1596 
               Alignment       =   1  'Right Justify
               Height          =   315
               Index           =   5
               Left            =   2160
               TabIndex        =   274
               TabStop         =   0   'False
               Top             =   2640
               Width           =   975
            End
            Begin VB.TextBox f1596 
               Alignment       =   1  'Right Justify
               Height          =   315
               Index           =   6
               Left            =   2160
               TabIndex        =   273
               TabStop         =   0   'False
               Top             =   3180
               Width           =   975
            End
            Begin VB.TextBox f37 
               Alignment       =   1  'Right Justify
               Height          =   315
               Index           =   6
               Left            =   960
               TabIndex        =   265
               TabStop         =   0   'False
               Top             =   3180
               Width           =   975
            End
            Begin VB.TextBox f37 
               Alignment       =   1  'Right Justify
               Height          =   315
               Index           =   5
               Left            =   960
               TabIndex        =   263
               TabStop         =   0   'False
               Top             =   2640
               Width           =   975
            End
            Begin VB.TextBox f37 
               Alignment       =   1  'Right Justify
               Height          =   315
               Index           =   4
               Left            =   960
               TabIndex        =   260
               TabStop         =   0   'False
               Top             =   2100
               Width           =   975
            End
            Begin VB.TextBox f37 
               Alignment       =   1  'Right Justify
               Height          =   315
               Index           =   3
               Left            =   960
               TabIndex        =   257
               TabStop         =   0   'False
               Top             =   1560
               Width           =   975
            End
            Begin VB.TextBox f37 
               Alignment       =   1  'Right Justify
               Height          =   315
               Index           =   2
               Left            =   960
               TabIndex        =   254
               TabStop         =   0   'False
               Top             =   1020
               Width           =   975
            End
            Begin VB.TextBox f37 
               Alignment       =   1  'Right Justify
               Height          =   315
               Index           =   1
               Left            =   960
               TabIndex        =   251
               TabStop         =   0   'False
               Top             =   480
               Width           =   975
            End
            Begin VB.Line Line22 
               BorderColor     =   &H0080C0FF&
               Index           =   0
               X1              =   480
               X2              =   6840
               Y1              =   900
               Y2              =   900
            End
            Begin VB.Line Line22 
               BorderColor     =   &H0080C0FF&
               Index           =   2
               X1              =   480
               X2              =   6840
               Y1              =   360
               Y2              =   360
            End
            Begin VB.Label Label1 
               Alignment       =   2  'Center
               BackColor       =   &H00FFFFFF&
               Caption         =   "Total Chg"
               BeginProperty Font 
                  Name            =   "MS Sans Serif"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   700
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Height          =   255
               Index           =   26
               Left            =   3360
               TabIndex        =   316
               Top             =   120
               Width           =   975
            End
            Begin VB.Line Line23 
               BorderColor     =   &H0080C0FF&
               Index           =   6
               X1              =   6840
               X2              =   6840
               Y1              =   0
               Y2              =   3615
            End
            Begin VB.Label Label1 
               Alignment       =   1  'Right Justify
               BackColor       =   &H00FFFFFF&
               Caption         =   "HD"
               BeginProperty Font 
                  Name            =   "MS Sans Serif"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   700
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Height          =   255
               Index           =   32
               Left            =   600
               TabIndex        =   272
               Top             =   3240
               Width           =   315
            End
            Begin VB.Label Label1 
               Alignment       =   1  'Right Justify
               BackColor       =   &H00FFFFFF&
               Caption         =   "GR"
               BeginProperty Font 
                  Name            =   "MS Sans Serif"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   700
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Height          =   255
               Index           =   31
               Left            =   600
               TabIndex        =   271
               Top             =   2700
               Width           =   315
            End
            Begin VB.Label Label1 
               Alignment       =   1  'Right Justify
               BackColor       =   &H00FFFFFF&
               Caption         =   "XS"
               BeginProperty Font 
                  Name            =   "MS Sans Serif"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   700
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Height          =   255
               Index           =   30
               Left            =   660
               TabIndex        =   270
               Top             =   2160
               Width           =   255
            End
            Begin VB.Label Label1 
               Alignment       =   1  'Right Justify
               BackColor       =   &H00FFFFFF&
               Caption         =   "ES"
               BeginProperty Font 
                  Name            =   "MS Sans Serif"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   700
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Height          =   255
               Index           =   29
               Left            =   660
               TabIndex        =   269
               Top             =   1620
               Width           =   255
            End
            Begin VB.Label Label1 
               Alignment       =   1  'Right Justify
               BackColor       =   &H00FFFFFF&
               Caption         =   "SO"
               BeginProperty Font 
                  Name            =   "MS Sans Serif"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   700
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Height          =   255
               Index           =   28
               Left            =   660
               TabIndex        =   268
               Top             =   1080
               Width           =   255
            End
            Begin VB.Label Label1 
               Alignment       =   1  'Right Justify
               BackColor       =   &H00FFFFFF&
               Caption         =   "PO"
               BeginProperty Font 
                  Name            =   "MS Sans Serif"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   700
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Height          =   255
               Index           =   27
               Left            =   660
               TabIndex        =   267
               Top             =   540
               Width           =   255
            End
            Begin VB.Line Line22 
               BorderColor     =   &H0080C0FF&
               Index           =   7
               X1              =   480
               X2              =   6840
               Y1              =   3600
               Y2              =   3600
            End
            Begin VB.Line Line22 
               BorderColor     =   &H0080C0FF&
               Index           =   6
               X1              =   480
               X2              =   6840
               Y1              =   3060
               Y2              =   3060
            End
            Begin VB.Line Line22 
               BorderColor     =   &H0080C0FF&
               Index           =   5
               X1              =   480
               X2              =   6840
               Y1              =   2520
               Y2              =   2520
            End
            Begin VB.Line Line22 
               BorderColor     =   &H0080C0FF&
               Index           =   4
               X1              =   480
               X2              =   6840
               Y1              =   1980
               Y2              =   1980
            End
            Begin VB.Line Line22 
               BorderColor     =   &H0080C0FF&
               Index           =   3
               X1              =   480
               X2              =   6840
               Y1              =   1440
               Y2              =   1440
            End
            Begin VB.Line Line23 
               BorderColor     =   &H0080C0FF&
               Index           =   4
               X1              =   5640
               X2              =   5640
               Y1              =   0
               Y2              =   3615
            End
            Begin VB.Line Line23 
               BorderColor     =   &H0080C0FF&
               Index           =   3
               X1              =   4440
               X2              =   4440
               Y1              =   0
               Y2              =   3615
            End
            Begin VB.Line Line23 
               BorderColor     =   &H0080C0FF&
               Index           =   2
               X1              =   3240
               X2              =   3240
               Y1              =   0
               Y2              =   3615
            End
            Begin VB.Line Line23 
               BorderColor     =   &H0080C0FF&
               Index           =   1
               X1              =   480
               X2              =   480
               Y1              =   -480
               Y2              =   3615
            End
            Begin VB.Line Line22 
               BorderColor     =   &H0080C0FF&
               Index           =   1
               X1              =   480
               X2              =   6840
               Y1              =   0
               Y2              =   0
            End
            Begin VB.Line Line23 
               BorderColor     =   &H0080C0FF&
               Index           =   0
               X1              =   2040
               X2              =   2040
               Y1              =   0
               Y2              =   3615
            End
            Begin VB.Label Label1 
               Alignment       =   2  'Center
               BackColor       =   &H00FFFFFF&
               Caption         =   "Del By Date"
               BeginProperty Font 
                  Name            =   "MS Sans Serif"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   700
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Height          =   255
               Index           =   35
               Left            =   4440
               TabIndex        =   250
               Top             =   120
               Width           =   1215
            End
            Begin VB.Label Label1 
               Alignment       =   2  'Center
               BackColor       =   &H00FFFFFF&
               Caption         =   "Del By Time"
               BeginProperty Font 
                  Name            =   "MS Sans Serif"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   700
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Height          =   255
               Index           =   36
               Left            =   5700
               TabIndex        =   249
               Top             =   120
               Width           =   1095
            End
            Begin VB.Label lblRate 
               Alignment       =   2  'Center
               BackColor       =   &H00FFFFFF&
               Caption         =   "Net"
               BeginProperty Font 
                  Name            =   "MS Sans Serif"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   700
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Height          =   255
               Index           =   0
               Left            =   960
               TabIndex        =   248
               Top             =   120
               Width           =   975
            End
            Begin VB.Label Label1 
               Alignment       =   2  'Center
               BackColor       =   &H00FFFFFF&
               Caption         =   "Handling"
               BeginProperty Font 
                  Name            =   "MS Sans Serif"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   700
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Height          =   255
               Index           =   33
               Left            =   2160
               TabIndex        =   279
               Top             =   120
               Width           =   975
            End
            Begin VB.Label lblRate 
               Alignment       =   2  'Center
               BackColor       =   &H00FFFFFF&
               Caption         =   "List Net"
               BeginProperty Font 
                  Name            =   "MS Sans Serif"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   700
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Height          =   255
               Index           =   1
               Left            =   960
               TabIndex        =   329
               Top             =   120
               Width           =   975
            End
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Current Location:"
            Height          =   255
            Index           =   10
            Left            =   600
            TabIndex        =   383
            Top             =   5400
            Width           =   1455
         End
         Begin VB.Label Label2 
            BackColor       =   &H00FFFFFF&
            Caption         =   "00 x 00 x 00 in."
            ForeColor       =   &H000080FF&
            Height          =   255
            Left            =   3840
            TabIndex        =   381
            Top             =   6900
            Width           =   1215
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Billed Wgt Ground:"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Index           =   58
            Left            =   8580
            TabIndex        =   340
            Top             =   3840
            Width           =   1755
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Billed Wgt Express:"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Index           =   57
            Left            =   8580
            TabIndex        =   339
            Top             =   3540
            Width           =   1755
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Package Dimensions:"
            Height          =   255
            Index           =   56
            Left            =   480
            TabIndex        =   305
            Top             =   6900
            Width           =   1575
         End
         Begin VB.Label Label24 
            Alignment       =   2  'Center
            BackColor       =   &H00FFFFFF&
            Caption         =   "x"
            BeginProperty Font 
               Name            =   "Verdana"
               Size            =   9.75
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Index           =   1
            Left            =   2520
            TabIndex        =   304
            Top             =   6870
            Width           =   255
         End
         Begin VB.Label Label73 
            Alignment       =   2  'Center
            BackColor       =   &H00FFFFFF&
            Caption         =   "x"
            BeginProperty Font 
               Name            =   "Verdana"
               Size            =   9.75
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Index           =   1
            Left            =   3120
            TabIndex        =   303
            Top             =   6870
            Width           =   255
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Declared Value:"
            Height          =   255
            Index           =   55
            Left            =   600
            TabIndex        =   302
            Top             =   6540
            Width           =   1455
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Total Charge:"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Index           =   54
            Left            =   9000
            TabIndex        =   301
            Top             =   2880
            Width           =   1335
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Handling Charge:"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Index           =   53
            Left            =   8760
            TabIndex        =   300
            Top             =   2520
            Width           =   1575
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Net Charge:"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Index           =   52
            Left            =   8880
            TabIndex        =   299
            Top             =   2160
            Width           =   1455
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Total Surcharges:"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Index           =   51
            Left            =   8760
            TabIndex        =   298
            Top             =   1800
            Width           =   1575
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Total Discount:"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Index           =   50
            Left            =   9000
            TabIndex        =   297
            Top             =   1440
            Width           =   1335
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Gross Charge:"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Index           =   49
            Left            =   9000
            TabIndex        =   296
            Top             =   1080
            Width           =   1335
         End
         Begin VB.Label lblRateDetails 
            Alignment       =   2  'Center
            BackColor       =   &H00FFFFFF&
            Caption         =   "Charges"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Left            =   10260
            TabIndex        =   295
            Top             =   720
            Width           =   1335
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Number of Pkgs:"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Index           =   40
            Left            =   360
            TabIndex        =   285
            Top             =   6180
            Width           =   1695
         End
         Begin VB.Line Line1 
            BorderColor     =   &H000080FF&
            BorderWidth     =   2
            Index           =   17
            X1              =   360
            X2              =   11520
            Y1              =   4980
            Y2              =   4980
         End
         Begin VB.Label Label56 
            BackColor       =   &H00FFFFFF&
            Caption         =   "Service Quote Properties"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H000080FF&
            Height          =   255
            Left            =   360
            TabIndex        =   284
            Top             =   4995
            Width           =   3375
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Package Weight:"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Index           =   39
            Left            =   3360
            TabIndex        =   283
            Top             =   6180
            Width           =   1575
         End
         Begin VB.Label Label1 
            BackColor       =   &H00FFFFFF&
            Caption         =   "Zip:"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Index           =   42
            Left            =   4560
            TabIndex        =   282
            Top             =   5820
            Width           =   375
         End
         Begin VB.Label Label1 
            BackColor       =   &H00FFFFFF&
            Caption         =   " Destination State:"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Index           =   38
            Left            =   480
            TabIndex        =   281
            Top             =   5820
            Width           =   1695
         End
         Begin VB.Line Line1 
            BorderColor     =   &H000080FF&
            BorderWidth     =   2
            Index           =   15
            X1              =   8580
            X2              =   11520
            Y1              =   120
            Y2              =   120
         End
         Begin VB.Label Label48 
            BackColor       =   &H00FFFFFF&
            Caption         =   "Rate Details"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H000080FF&
            Height          =   255
            Left            =   8580
            TabIndex        =   280
            Top             =   135
            Width           =   2775
         End
         Begin VB.Line Line1 
            BorderColor     =   &H000080FF&
            BorderWidth     =   2
            Index           =   16
            X1              =   8400
            X2              =   8400
            Y1              =   360
            Y2              =   4680
         End
         Begin VB.Label Label19 
            BackColor       =   &H00FFFFFF&
            Caption         =   "Rates and Delivery Commitments"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H000080FF&
            Height          =   255
            Left            =   360
            TabIndex        =   246
            Top             =   135
            Width           =   3375
         End
         Begin VB.Line Line1 
            BorderColor     =   &H000080FF&
            BorderWidth     =   2
            Index           =   14
            X1              =   360
            X2              =   8100
            Y1              =   120
            Y2              =   120
         End
      End
      Begin VB.Frame fraScreens 
         BackColor       =   &H00FFFFFF&
         BorderStyle     =   0  'None
         Caption         =   "Frame1"
         Height          =   7440
         Index           =   2
         Left            =   -74985
         TabIndex        =   140
         Top             =   315
         Width           =   11940
         Begin VB.CheckBox chkBatchErrorCheck 
            BackColor       =   &H00FFFFFF&
            Caption         =   "Check for Errors"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Left            =   1440
            TabIndex        =   134
            Top             =   1860
            Width           =   1755
         End
         Begin VB.ComboBox cboBatchProfile 
            Height          =   315
            Left            =   1440
            TabIndex        =   129
            Top             =   480
            Width           =   3255
         End
         Begin VB.CommandButton cmdBrowse 
            BackColor       =   &H00E0E0E0&
            Caption         =   "..."
            BeginProperty Font 
               Name            =   "Arial Black"
               Size            =   8.25
               Charset         =   0
               Weight          =   900
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   315
            Left            =   4800
            Style           =   1  'Graphical
            TabIndex        =   131
            Top             =   960
            Width           =   375
         End
         Begin VB.ListBox lstErrorTransactions 
            Height          =   4545
            Left            =   360
            TabIndex        =   218
            TabStop         =   0   'False
            ToolTipText     =   "Double-click a line to process on Ship screen."
            Top             =   2580
            Width           =   11175
         End
         Begin VB.CommandButton cmdShipAll 
            Appearance      =   0  'Flat
            BackColor       =   &H00C0E0FF&
            Caption         =   "Ship All"
            Height          =   285
            Left            =   1440
            MaskColor       =   &H0080C0FF&
            Style           =   1  'Graphical
            TabIndex        =   132
            Top             =   1440
            UseMaskColor    =   -1  'True
            Width           =   1485
         End
         Begin VB.TextBox txtBatchFilename 
            Height          =   315
            Left            =   1440
            TabIndex        =   130
            Top             =   960
            Width           =   3255
         End
         Begin VB.CommandButton cmdAbortBatch 
            Appearance      =   0  'Flat
            BackColor       =   &H00E0E0E0&
            Caption         =   "Pause/Abort"
            Height          =   285
            Left            =   3180
            MaskColor       =   &H00E0E0E0&
            Style           =   1  'Graphical
            TabIndex        =   133
            Top             =   1440
            Width           =   1485
         End
         Begin VB.TextBox txtTotalRecords 
            Height          =   315
            Left            =   8880
            Locked          =   -1  'True
            TabIndex        =   135
            TabStop         =   0   'False
            Top             =   480
            Width           =   855
         End
         Begin VB.TextBox txtNumShipped 
            Height          =   315
            Left            =   8880
            Locked          =   -1  'True
            TabIndex        =   136
            TabStop         =   0   'False
            Top             =   840
            Width           =   855
         End
         Begin VB.TextBox txtNumErrors 
            Height          =   315
            Left            =   8880
            Locked          =   -1  'True
            TabIndex        =   137
            TabStop         =   0   'False
            Top             =   1200
            Width           =   855
         End
         Begin MSComDlg.CommonDialog cdlBatchFilename 
            Left            =   240
            Top             =   6720
            _ExtentX        =   847
            _ExtentY        =   847
            _Version        =   393216
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Profile:"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Index           =   47
            Left            =   480
            TabIndex        =   288
            Top             =   540
            Width           =   855
         End
         Begin VB.Label Label38 
            BackColor       =   &H00FFFFFF&
            Caption         =   "Batch Shipment Details"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H000080FF&
            Height          =   255
            Index           =   0
            Left            =   6360
            TabIndex        =   147
            Top             =   135
            Width           =   2775
         End
         Begin VB.Line Line1 
            BorderColor     =   &H000080FF&
            BorderWidth     =   2
            Index           =   21
            X1              =   6360
            X2              =   11520
            Y1              =   120
            Y2              =   120
         End
         Begin VB.Line Line1 
            BorderColor     =   &H000080FF&
            BorderWidth     =   2
            Index           =   22
            X1              =   6000
            X2              =   6000
            Y1              =   300
            Y2              =   1680
         End
         Begin VB.Line Line1 
            BorderColor     =   &H000080FF&
            BorderWidth     =   2
            Index           =   20
            X1              =   360
            X2              =   5580
            Y1              =   120
            Y2              =   120
         End
         Begin VB.Line Line1 
            BorderColor     =   &H000080FF&
            BorderWidth     =   2
            Index           =   13
            X1              =   360
            X2              =   11520
            Y1              =   2220
            Y2              =   2220
         End
         Begin VB.Label Label62 
            BackColor       =   &H00FFFFFF&
            Caption         =   "File Information"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H000080FF&
            Height          =   255
            Index           =   0
            Left            =   360
            TabIndex        =   146
            Top             =   135
            Width           =   2055
         End
         Begin VB.Label Label63 
            BackColor       =   &H00FFFFFF&
            Caption         =   "Error Transactions"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H000080FF&
            Height          =   255
            Index           =   0
            Left            =   360
            TabIndex        =   145
            Top             =   2235
            Width           =   2055
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Filename:"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Index           =   17
            Left            =   480
            TabIndex        =   144
            Top             =   1020
            Width           =   855
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Number Shipped:"
            Height          =   255
            Index           =   24
            Left            =   7080
            TabIndex        =   143
            Top             =   900
            Width           =   1695
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Total Records:"
            Height          =   255
            Index           =   18
            Left            =   7200
            TabIndex        =   142
            Top             =   540
            Width           =   1575
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Number of Errors:"
            Height          =   255
            Index           =   25
            Left            =   7080
            TabIndex        =   141
            Top             =   1260
            Width           =   1695
         End
      End
      Begin VB.Frame fraScreens 
         BackColor       =   &H00FFFFFF&
         BorderStyle     =   0  'None
         Caption         =   "Frame1"
         Height          =   7440
         Index           =   1
         Left            =   -74985
         TabIndex        =   148
         Top             =   315
         Width           =   11940
         Begin MSDataGridLib.DataGrid grdCommodities 
            Height          =   1815
            Left            =   6360
            TabIndex        =   216
            TabStop         =   0   'False
            ToolTipText     =   "To Delete a Commodity highlight the row and press the Delete key."
            Top             =   480
            Width           =   5055
            _ExtentX        =   8916
            _ExtentY        =   3201
            _Version        =   393216
            ForeColor       =   0
            HeadLines       =   2
            RowHeight       =   15
            TabAction       =   2
            WrapCellPointer =   -1  'True
            AllowAddNew     =   -1  'True
            AllowDelete     =   -1  'True
            BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Caption         =   "Total Commodities: 0"
            ColumnCount     =   2
            BeginProperty Column00 
               DataField       =   ""
               Caption         =   ""
               BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
                  Type            =   0
                  Format          =   ""
                  HaveTrueFalseNull=   0
                  FirstDayOfWeek  =   0
                  FirstWeekOfYear =   0
                  LCID            =   1033
                  SubFormatType   =   0
               EndProperty
            EndProperty
            BeginProperty Column01 
               DataField       =   ""
               Caption         =   ""
               BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
                  Type            =   0
                  Format          =   ""
                  HaveTrueFalseNull=   0
                  FirstDayOfWeek  =   0
                  FirstWeekOfYear =   0
                  LCID            =   1033
                  SubFormatType   =   0
               EndProperty
            EndProperty
            SplitCount      =   1
            BeginProperty Split0 
               BeginProperty Column00 
               EndProperty
               BeginProperty Column01 
               EndProperty
            EndProperty
         End
         Begin VB.CheckBox f73 
            BackColor       =   &H00FFFFFF&
            Caption         =   "Parties Related"
            Height          =   255
            Left            =   2400
            TabIndex        =   102
            Top             =   1575
            Width           =   3015
         End
         Begin VB.ComboBox f74 
            Height          =   315
            Left            =   2400
            TabIndex        =   101
            Top             =   1230
            Width           =   3135
         End
         Begin VB.Frame fraCommodity 
            BackColor       =   &H00FFFFFF&
            BorderStyle     =   0  'None
            Caption         =   "Frame2"
            Height          =   4530
            Left            =   240
            TabIndex        =   199
            Top             =   2625
            Width           =   5415
            Begin VB.TextBox f120 
               Height          =   315
               Left            =   2175
               TabIndex        =   114
               Top             =   3000
               Width           =   3165
            End
            Begin VB.TextBox f1275 
               Height          =   315
               Left            =   2175
               TabIndex        =   115
               Top             =   3375
               Width           =   3165
            End
            Begin MSACAL.Calendar Calendar2 
               Height          =   390
               Left            =   3375
               TabIndex        =   211
               TabStop         =   0   'False
               Top             =   3750
               Visible         =   0   'False
               Width           =   390
               _Version        =   524288
               _ExtentX        =   688
               _ExtentY        =   688
               _StockProps     =   1
               BackColor       =   16777215
               Year            =   2004
               Month           =   2
               Day             =   9
               DayLength       =   1
               MonthLength     =   2
               DayFontColor    =   0
               FirstDay        =   1
               GridCellEffect  =   1
               GridFontColor   =   10485760
               GridLinesColor  =   -2147483632
               ShowDateSelectors=   -1  'True
               ShowDays        =   -1  'True
               ShowHorizontalGrid=   -1  'True
               ShowTitle       =   0   'False
               ShowVerticalGrid=   -1  'True
               TitleFontColor  =   10485760
               ValueIsNull     =   -1  'True
               BeginProperty DayFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Arial"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   700
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               BeginProperty GridFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Arial"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               BeginProperty TitleFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Arial"
                  Size            =   12
                  Charset         =   0
                  Weight          =   700
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
            End
            Begin VB.ComboBox f68 
               Height          =   315
               ItemData        =   "frmShip.frx":06BC
               Left            =   4575
               List            =   "frmShip.frx":06C3
               TabIndex        =   109
               Text            =   "USD"
               Top             =   1530
               Width           =   765
            End
            Begin VB.TextBox f119 
               Height          =   315
               Left            =   2175
               TabIndex        =   108
               Top             =   1500
               Width           =   2190
            End
            Begin VB.TextBox f1030 
               Height          =   315
               Left            =   2175
               TabIndex        =   107
               Top             =   1125
               Width           =   2190
            End
            Begin VB.TextBox txtCommodityWgt 
               Height          =   315
               Left            =   4575
               TabIndex        =   111
               Top             =   1875
               Width           =   765
            End
            Begin VB.ComboBox cboCommodityID 
               Height          =   315
               Left            =   2175
               Style           =   2  'Dropdown List
               TabIndex        =   103
               Top             =   0
               Width           =   3165
            End
            Begin VB.TextBox f79 
               Height          =   315
               Left            =   2175
               TabIndex        =   104
               Top             =   375
               Width           =   3165
            End
            Begin VB.TextBox f82 
               Height          =   315
               Left            =   2175
               TabIndex        =   105
               Top             =   750
               Width           =   915
            End
            Begin VB.ComboBox f414 
               Height          =   315
               Left            =   3825
               TabIndex        =   106
               Top             =   750
               Width           =   1515
            End
            Begin VB.TextBox f77 
               Height          =   315
               Left            =   2175
               TabIndex        =   110
               Top             =   1875
               Width           =   915
            End
            Begin VB.ComboBox f80 
               Height          =   315
               Index           =   0
               Left            =   2175
               TabIndex        =   112
               Top             =   2250
               Width           =   3165
            End
            Begin VB.TextBox f81 
               Height          =   315
               Left            =   2175
               TabIndex        =   113
               Top             =   2625
               Width           =   3165
            End
            Begin VB.TextBox f83 
               Height          =   315
               Left            =   2175
               TabIndex        =   116
               Top             =   3750
               Width           =   1140
            End
            Begin VB.TextBox f84 
               Height          =   315
               Left            =   2175
               TabIndex        =   117
               Top             =   4125
               Width           =   1140
            End
            Begin VB.CommandButton cmdAddToShipment 
               Appearance      =   0  'Flat
               BackColor       =   &H00E0E0E0&
               Caption         =   "Add to Shipment"
               Height          =   315
               Left            =   3825
               MaskColor       =   &H00E0E0E0&
               Style           =   1  'Graphical
               TabIndex        =   118
               Top             =   4125
               Width           =   1515
            End
            Begin VB.Label lblCommodity 
               Alignment       =   1  'Right Justify
               BackColor       =   &H00FFFFFF&
               Caption         =   "Marks and Numbers:"
               Height          =   315
               Index           =   14
               Left            =   375
               TabIndex        =   390
               Top             =   3075
               Width           =   1740
            End
            Begin VB.Label lblCommodity 
               Alignment       =   1  'Right Justify
               BackColor       =   &H00FFFFFF&
               Caption         =   "Part Number:"
               Height          =   315
               Index           =   11
               Left            =   375
               TabIndex        =   389
               Top             =   3450
               Width           =   1740
            End
            Begin VB.Label lblCommodity 
               Alignment       =   1  'Right Justify
               BackColor       =   &H00FFFFFF&
               Caption         =   "Wgt Each:"
               BeginProperty Font 
                  Name            =   "MS Sans Serif"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   700
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Height          =   315
               Index           =   8
               Left            =   3450
               TabIndex        =   217
               Top             =   1950
               Width           =   990
            End
            Begin VB.Label lblCommodity 
               Alignment       =   1  'Right Justify
               BackColor       =   &H00FFFFFF&
               Caption         =   "Commodity ID:"
               BeginProperty Font 
                  Name            =   "MS Sans Serif"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   700
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Height          =   315
               Index           =   1
               Left            =   600
               TabIndex        =   210
               Top             =   75
               Width           =   1515
            End
            Begin VB.Label lblCommodity 
               Alignment       =   1  'Right Justify
               BackColor       =   &H00FFFFFF&
               Caption         =   "Description:"
               BeginProperty Font 
                  Name            =   "MS Sans Serif"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   700
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Height          =   315
               Index           =   2
               Left            =   450
               TabIndex        =   209
               Top             =   450
               Width           =   1665
            End
            Begin VB.Label lblCommodity 
               Alignment       =   1  'Right Justify
               BackColor       =   &H00FFFFFF&
               Caption         =   "Number of Units:"
               BeginProperty Font 
                  Name            =   "MS Sans Serif"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   700
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Height          =   315
               Index           =   3
               Left            =   600
               TabIndex        =   208
               Top             =   825
               Width           =   1515
            End
            Begin VB.Label lblCommodity 
               Alignment       =   1  'Right Justify
               BackColor       =   &H00FFFFFF&
               Caption         =   "UOM:"
               BeginProperty Font 
                  Name            =   "MS Sans Serif"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   700
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Height          =   315
               Index           =   4
               Left            =   3075
               TabIndex        =   207
               Top             =   825
               Width           =   690
            End
            Begin VB.Label lblCommodity 
               Alignment       =   1  'Right Justify
               BackColor       =   &H00FFFFFF&
               Caption         =   "Unit Value:"
               BeginProperty Font 
                  Name            =   "MS Sans Serif"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   700
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Height          =   315
               Index           =   5
               Left            =   600
               TabIndex        =   206
               Top             =   1200
               Width           =   1515
            End
            Begin VB.Label lblCommodity 
               Alignment       =   1  'Right Justify
               BackColor       =   &H00FFFFFF&
               Caption         =   "Total Customs Value:"
               BeginProperty Font 
                  Name            =   "MS Sans Serif"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   700
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Height          =   315
               Index           =   6
               Left            =   150
               TabIndex        =   205
               Top             =   1500
               Width           =   1965
            End
            Begin VB.Label lblCommodity 
               Alignment       =   1  'Right Justify
               BackColor       =   &H00FFFFFF&
               Caption         =   "Total Commodity Wgt:"
               BeginProperty Font 
                  Name            =   "MS Sans Serif"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   700
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Height          =   315
               Index           =   7
               Left            =   150
               TabIndex        =   204
               Top             =   1950
               Width           =   1965
            End
            Begin VB.Label lblCommodity 
               Alignment       =   1  'Right Justify
               BackColor       =   &H00FFFFFF&
               Caption         =   "Country of Manu:"
               BeginProperty Font 
                  Name            =   "MS Sans Serif"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   700
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Height          =   315
               Index           =   9
               Left            =   375
               TabIndex        =   203
               Top             =   2325
               Width           =   1740
            End
            Begin VB.Label lblCommodity 
               Alignment       =   1  'Right Justify
               BackColor       =   &H00FFFFFF&
               Caption         =   "Harmonized Code:"
               BeginProperty Font 
                  Name            =   "MS Sans Serif"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   700
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Height          =   315
               Index           =   10
               Left            =   375
               TabIndex        =   202
               Top             =   2700
               Width           =   1740
            End
            Begin VB.Label lblCommodity 
               Alignment       =   1  'Right Justify
               BackColor       =   &H00FFFFFF&
               Caption         =   "Export License:"
               Height          =   315
               Index           =   12
               Left            =   600
               TabIndex        =   201
               Top             =   3825
               Width           =   1515
            End
            Begin VB.Image Image3 
               Height          =   390
               Left            =   3375
               Picture         =   "frmShip.frx":06CC
               Stretch         =   -1  'True
               Top             =   4050
               Width           =   390
            End
            Begin VB.Label lblCommodity 
               Alignment       =   1  'Right Justify
               BackColor       =   &H00FFFFFF&
               Caption         =   "Expiration Date:"
               Height          =   315
               Index           =   13
               Left            =   825
               TabIndex        =   200
               Top             =   4200
               Width           =   1290
            End
         End
         Begin VB.Frame fraCI 
            BackColor       =   &H00FFFFFF&
            BorderStyle     =   0  'None
            Caption         =   "Frame2"
            Height          =   2895
            Left            =   6360
            TabIndex        =   188
            Top             =   4320
            Width           =   5055
            Begin VB.CheckBox chkIOR 
               BackColor       =   &H00FFFFFF&
               Caption         =   "Importer of Record"
               Height          =   255
               Left            =   1800
               TabIndex        =   402
               Top             =   2475
               Width           =   2010
            End
            Begin VB.CommandButton cmdViewIOR 
               Appearance      =   0  'Flat
               BackColor       =   &H00E0E0E0&
               Caption         =   "View/Edit"
               Height          =   255
               Left            =   4080
               MaskColor       =   &H0080C0FF&
               Style           =   1  'Graphical
               TabIndex        =   401
               Top             =   2475
               UseMaskColor    =   -1  'True
               Width           =   960
            End
            Begin VB.CheckBox f113 
               BackColor       =   &H00FFFFFF&
               Caption         =   "Print FedEx CI"
               Height          =   285
               Left            =   1800
               TabIndex        =   400
               Top             =   0
               Width           =   3030
            End
            Begin VB.TextBox f418 
               Height          =   330
               Index           =   3
               Left            =   1800
               TabIndex        =   128
               Top             =   2070
               Width           =   3255
            End
            Begin VB.TextBox f418 
               Height          =   330
               Index           =   2
               Left            =   1800
               TabIndex        =   127
               Top             =   1710
               Width           =   3255
            End
            Begin VB.ComboBox f1357 
               Height          =   315
               ItemData        =   "frmShip.frx":09D6
               Left            =   3105
               List            =   "frmShip.frx":09EC
               TabIndex        =   125
               Top             =   990
               Width           =   1950
            End
            Begin VB.ComboBox f72 
               Height          =   315
               ItemData        =   "frmShip.frx":0A5D
               Left            =   1800
               List            =   "frmShip.frx":0A73
               TabIndex        =   121
               Top             =   315
               Width           =   3255
            End
            Begin VB.TextBox f418 
               Height          =   330
               Index           =   1
               Left            =   1800
               TabIndex        =   126
               Top             =   1350
               Width           =   3255
            End
            Begin VB.TextBox f532 
               Height          =   330
               Left            =   1800
               TabIndex        =   122
               Top             =   630
               Width           =   1230
            End
            Begin VB.TextBox f533 
               Height          =   330
               Left            =   3105
               TabIndex        =   123
               Top             =   630
               Width           =   1230
            End
            Begin VB.TextBox f534 
               Height          =   330
               Left            =   1800
               TabIndex        =   124
               Top             =   990
               Width           =   1230
            End
            Begin VB.Label lblCI 
               Alignment       =   1  'Right Justify
               BackColor       =   &H00FFFFFF&
               Caption         =   "Comment 3:"
               Height          =   285
               Index           =   6
               Left            =   135
               TabIndex        =   194
               Top             =   2115
               Width           =   1590
            End
            Begin VB.Label lblCI 
               Alignment       =   1  'Right Justify
               BackColor       =   &H00FFFFFF&
               Caption         =   "Comment 2:"
               Height          =   285
               Index           =   5
               Left            =   135
               TabIndex        =   193
               Top             =   1755
               Width           =   1590
            End
            Begin VB.Label lblCI 
               Alignment       =   1  'Right Justify
               BackColor       =   &H00FFFFFF&
               Caption         =   "Terms of Sale:"
               BeginProperty Font 
                  Name            =   "MS Sans Serif"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   700
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Height          =   285
               Index           =   0
               Left            =   220
               TabIndex        =   192
               Top             =   360
               Width           =   1500
            End
            Begin VB.Label lblCI 
               Alignment       =   1  'Right Justify
               BackColor       =   &H00FFFFFF&
               Caption         =   "Comment 1:"
               Height          =   285
               Index           =   4
               Left            =   135
               TabIndex        =   191
               Top             =   1395
               Width           =   1590
            End
            Begin VB.Label lblCI 
               Alignment       =   1  'Right Justify
               BackColor       =   &H00FFFFFF&
               Caption         =   "Freight/Ins. Charge:"
               Height          =   285
               Index           =   1
               Left            =   220
               TabIndex        =   190
               Top             =   675
               Width           =   1500
            End
            Begin VB.Label lblCI 
               Alignment       =   1  'Right Justify
               BackColor       =   &H00FFFFFF&
               Caption         =   "Misc. Charge:"
               Height          =   285
               Index           =   3
               Left            =   220
               TabIndex        =   189
               Top             =   1035
               Width           =   1500
            End
         End
         Begin VB.Frame fraSEDShipper 
            BackColor       =   &H00FFFFFF&
            BorderStyle     =   0  'None
            Caption         =   "Frame2"
            Height          =   1095
            Left            =   6480
            TabIndex        =   196
            Top             =   2880
            Width           =   5295
            Begin VB.TextBox f1653 
               Height          =   315
               Left            =   1680
               TabIndex        =   398
               Top             =   720
               Width           =   2775
            End
            Begin VB.CheckBox chkB13A 
               BackColor       =   &H00FFFFFF&
               Caption         =   "B13A Required"
               BeginProperty Font 
                  Name            =   "MS Sans Serif"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   700
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Height          =   255
               Left            =   3480
               TabIndex        =   388
               Top             =   360
               Width           =   1755
            End
            Begin VB.CheckBox f413 
               BackColor       =   &H00FFFFFF&
               Caption         =   "NAFTA Applies"
               BeginProperty Font 
                  Name            =   "MS Sans Serif"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   700
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Height          =   255
               Left            =   1680
               TabIndex        =   120
               Top             =   360
               Width           =   1755
            End
            Begin VB.TextBox f1358 
               Height          =   315
               Left            =   1680
               TabIndex        =   119
               Top             =   0
               Width           =   3135
            End
            Begin VB.Label Label3 
               Alignment       =   1  'Right Justify
               BackColor       =   &H00FFFFFF&
               Caption         =   "Export Permit #:"
               Height          =   315
               Left            =   -360
               TabIndex        =   399
               Top             =   780
               Width           =   1995
            End
            Begin VB.Label lbl1358 
               Alignment       =   1  'Right Justify
               BackColor       =   &H00FFFFFF&
               Caption         =   "ITN/FTSR/XTN #:"
               Height          =   255
               Left            =   -240
               TabIndex        =   197
               Top             =   60
               Width           =   1815
            End
         End
         Begin VB.Frame fraCommod 
            BackColor       =   &H00FFFFFF&
            BorderStyle     =   0  'None
            Caption         =   "Frame2"
            Height          =   1155
            Left            =   360
            TabIndex        =   238
            Top             =   30
            Width           =   5415
            Begin VB.TextBox f71 
               Height          =   315
               Left            =   2040
               TabIndex        =   98
               Top             =   840
               Width           =   3135
            End
            Begin VB.ComboBox f70 
               Height          =   315
               ItemData        =   "frmShip.frx":0B59
               Left            =   2040
               List            =   "frmShip.frx":0B66
               TabIndex        =   97
               Top             =   480
               Width           =   3135
            End
            Begin VB.Label lblf20 
               Alignment       =   1  'Right Justify
               BackColor       =   &H00FFFFFF&
               Caption         =   "Duty/Tax Account #:"
               Height          =   255
               Index           =   1
               Left            =   360
               TabIndex        =   241
               Top             =   900
               Width           =   1575
            End
            Begin VB.Label Label1 
               Alignment       =   1  'Right Justify
               BackColor       =   &H00FFFFFF&
               Caption         =   "Duty/Tax Pay Type:"
               BeginProperty Font 
                  Name            =   "MS Sans Serif"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   700
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Height          =   255
               Index           =   23
               Left            =   0
               TabIndex        =   240
               Top             =   540
               Width           =   1935
            End
            Begin VB.Line Line1 
               BorderColor     =   &H000080FF&
               BorderWidth     =   2
               Index           =   6
               X1              =   0
               X2              =   5220
               Y1              =   90
               Y2              =   90
            End
            Begin VB.Label Label46 
               BackColor       =   &H00FFFFFF&
               Caption         =   "International Commodities"
               BeginProperty Font 
                  Name            =   "MS Sans Serif"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   700
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               ForeColor       =   &H000080FF&
               Height          =   255
               Left            =   0
               TabIndex        =   239
               Top             =   105
               Width           =   2775
            End
         End
         Begin VB.Frame fraDocs 
            BackColor       =   &H00FFFFFF&
            BorderStyle     =   0  'None
            Caption         =   "Frame3"
            Height          =   1155
            Left            =   360
            TabIndex        =   212
            Top             =   30
            Width           =   5415
            Begin VB.ComboBox f79Doc 
               Height          =   315
               Left            =   2040
               TabIndex        =   99
               Top             =   480
               Width           =   3135
            End
            Begin VB.ComboBox f80 
               Height          =   315
               Index           =   1
               Left            =   2040
               TabIndex        =   100
               Top             =   840
               Width           =   3135
            End
            Begin VB.Label Label1 
               Alignment       =   1  'Right Justify
               BackColor       =   &H00FFFFFF&
               Caption         =   "Document Type:"
               BeginProperty Font 
                  Name            =   "MS Sans Serif"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   700
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Height          =   255
               Index           =   16
               Left            =   240
               TabIndex        =   215
               Top             =   540
               Width           =   1695
            End
            Begin VB.Label lbl80 
               Alignment       =   1  'Right Justify
               BackColor       =   &H00FFFFFF&
               Caption         =   "Country of Manu:"
               BeginProperty Font 
                  Name            =   "MS Sans Serif"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   700
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Height          =   255
               Left            =   240
               TabIndex        =   213
               Top             =   900
               Width           =   1695
            End
            Begin VB.Line Line1 
               BorderColor     =   &H000080FF&
               BorderWidth     =   2
               Index           =   12
               X1              =   0
               X2              =   5040
               Y1              =   90
               Y2              =   90
            End
            Begin VB.Label Label27 
               BackColor       =   &H00FFFFFF&
               Caption         =   "International Documents"
               BeginProperty Font 
                  Name            =   "MS Sans Serif"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   700
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               ForeColor       =   &H000080FF&
               Height          =   255
               Left            =   0
               TabIndex        =   214
               Top             =   105
               Width           =   2775
            End
         End
         Begin VB.Frame Frame1 
            BackColor       =   &H00FFFFFF&
            BorderStyle     =   0  'None
            Caption         =   "Frame1"
            Height          =   300
            Left            =   375
            TabIndex        =   392
            Top             =   1800
            Width           =   4575
            Begin VB.OptionButton optCommodities 
               BackColor       =   &H00FFFFFF&
               Caption         =   "Commodities"
               Height          =   255
               Left            =   2520
               TabIndex        =   394
               Top             =   75
               Visible         =   0   'False
               Width           =   1215
            End
            Begin VB.OptionButton optDocument 
               BackColor       =   &H00FFFFFF&
               Caption         =   "Document"
               Height          =   255
               Left            =   720
               TabIndex        =   393
               Top             =   75
               Visible         =   0   'False
               Width           =   1215
            End
         End
         Begin VB.Line Line1 
            BorderColor     =   &H000080FF&
            BorderWidth     =   2
            Index           =   7
            X1              =   360
            X2              =   5580
            Y1              =   2325
            Y2              =   2325
         End
         Begin VB.Label Label81 
            BackColor       =   &H00FFFFFF&
            Caption         =   "Customs Information"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H000080FF&
            Height          =   255
            Left            =   6360
            TabIndex        =   198
            Top             =   2535
            Width           =   2775
         End
         Begin VB.Line Line1 
            BorderColor     =   &H000080FF&
            BorderWidth     =   2
            Index           =   9
            X1              =   6360
            X2              =   11520
            Y1              =   2520
            Y2              =   2520
         End
         Begin VB.Label Label76 
            BackColor       =   &H00FFFFFF&
            Caption         =   "Commodity Summary"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H000080FF&
            Height          =   255
            Left            =   6360
            TabIndex        =   195
            Top             =   135
            Width           =   2775
         End
         Begin VB.Line Line1 
            BorderColor     =   &H000080FF&
            BorderWidth     =   2
            Index           =   8
            X1              =   6360
            X2              =   11520
            Y1              =   120
            Y2              =   120
         End
         Begin VB.Label lblCommodity 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Ultimate Destination:"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Index           =   0
            Left            =   480
            TabIndex        =   173
            Top             =   1290
            Width           =   1815
         End
         Begin VB.Label Label47 
            BackColor       =   &H00FFFFFF&
            Caption         =   "Define Commodities"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H000080FF&
            Height          =   255
            Left            =   360
            TabIndex        =   150
            Top             =   2325
            Width           =   2055
         End
         Begin VB.Line Line1 
            BorderColor     =   &H000080FF&
            BorderWidth     =   2
            Index           =   11
            X1              =   6000
            X2              =   6000
            Y1              =   300
            Y2              =   7080
         End
         Begin VB.Line Line1 
            BorderColor     =   &H000080FF&
            BorderWidth     =   2
            Index           =   10
            X1              =   6360
            X2              =   11520
            Y1              =   4080
            Y2              =   4080
         End
         Begin VB.Label Label26 
            BackColor       =   &H00FFFFFF&
            Caption         =   "Commercial Invoice"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H000080FF&
            Height          =   255
            Left            =   6360
            TabIndex        =   149
            Top             =   4095
            Width           =   2775
         End
      End
      Begin SHDocVwCtl.WebBrowser WebBrowser1 
         Height          =   7335
         Left            =   -74880
         TabIndex        =   219
         Top             =   360
         Width           =   11775
         ExtentX         =   20770
         ExtentY         =   12938
         ViewMode        =   0
         Offline         =   0
         Silent          =   0
         RegisterAsBrowser=   0
         RegisterAsDropTarget=   1
         AutoArrange     =   0   'False
         NoClientEdge    =   0   'False
         AlignLeft       =   0   'False
         NoWebView       =   0   'False
         HideFileNames   =   0   'False
         SingleClick     =   0   'False
         SingleSelection =   0   'False
         NoFolders       =   0   'False
         Transparent     =   0   'False
         ViewID          =   "{0057D0E0-3573-11CF-AE69-08002B2E1262}"
         Location        =   ""
      End
      Begin VB.Frame fraScreens 
         BackColor       =   &H00FFFFFF&
         BorderStyle     =   0  'None
         Caption         =   "Frame1"
         Height          =   7440
         Index           =   0
         Left            =   15
         TabIndex        =   151
         Top             =   300
         Width           =   11940
         Begin VB.CheckBox f1482 
            BackColor       =   &H00FFFFFF&
            Caption         =   "TD"
            Height          =   315
            Left            =   10485
            TabIndex        =   403
            Top             =   855
            Visible         =   0   'False
            Width           =   825
         End
         Begin VB.TextBox f1222 
            Height          =   315
            Left            =   8175
            TabIndex        =   23
            Top             =   450
            Width           =   3090
         End
         Begin VB.ComboBox f1355 
            Height          =   315
            Left            =   1800
            TabIndex        =   22
            Top             =   6900
            Width           =   3135
         End
         Begin VB.CheckBox chkAddAddress 
            BackColor       =   &H00FFFFFF&
            Caption         =   "Add To Address Book"
            Height          =   255
            Left            =   3720
            TabIndex        =   13
            Top             =   3420
            Value           =   1  'Checked
            Visible         =   0   'False
            Width           =   1875
         End
         Begin MSACAL.Calendar Calendar1 
            Height          =   330
            Left            =   10950
            TabIndex        =   174
            TabStop         =   0   'False
            Top             =   3000
            Visible         =   0   'False
            Width           =   330
            _Version        =   524288
            _ExtentX        =   582
            _ExtentY        =   582
            _StockProps     =   1
            BackColor       =   16777215
            Year            =   2004
            Month           =   2
            Day             =   9
            DayLength       =   1
            MonthLength     =   2
            DayFontColor    =   0
            FirstDay        =   1
            GridCellEffect  =   1
            GridFontColor   =   10485760
            GridLinesColor  =   -2147483632
            ShowDateSelectors=   -1  'True
            ShowDays        =   -1  'True
            ShowHorizontalGrid=   -1  'True
            ShowTitle       =   0   'False
            ShowVerticalGrid=   -1  'True
            TitleFontColor  =   10485760
            ValueIsNull     =   -1  'True
            BeginProperty DayFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Arial"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            BeginProperty GridFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Arial"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            BeginProperty TitleFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Arial"
               Size            =   12
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
         End
         Begin MSACAL.Calendar Calendar4 
            Height          =   330
            Left            =   10575
            TabIndex        =   380
            TabStop         =   0   'False
            Top             =   3000
            Visible         =   0   'False
            Width           =   330
            _Version        =   524288
            _ExtentX        =   582
            _ExtentY        =   582
            _StockProps     =   1
            BackColor       =   16777215
            Year            =   2004
            Month           =   2
            Day             =   9
            DayLength       =   1
            MonthLength     =   2
            DayFontColor    =   0
            FirstDay        =   1
            GridCellEffect  =   1
            GridFontColor   =   10485760
            GridLinesColor  =   -2147483632
            ShowDateSelectors=   -1  'True
            ShowDays        =   -1  'True
            ShowHorizontalGrid=   -1  'True
            ShowTitle       =   0   'False
            ShowVerticalGrid=   -1  'True
            TitleFontColor  =   10485760
            ValueIsNull     =   -1  'True
            BeginProperty DayFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Arial"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            BeginProperty GridFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Arial"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            BeginProperty TitleFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Arial"
               Size            =   12
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
         End
         Begin VB.TextBox txtDelDate 
            Height          =   315
            Left            =   9900
            TabIndex        =   35
            Top             =   2625
            Visible         =   0   'False
            Width           =   990
         End
         Begin VB.ComboBox cboLocationName 
            Height          =   315
            Index           =   0
            Left            =   1800
            TabIndex        =   21
            Top             =   6540
            Width           =   3135
         End
         Begin VB.CheckBox chkEmailAlert 
            BackColor       =   &H00FFFFFF&
            Caption         =   "Email Alerts"
            Height          =   255
            Left            =   3720
            TabIndex        =   15
            Top             =   3720
            Width           =   1215
         End
         Begin VB.CommandButton cmdMPS 
            Appearance      =   0  'Flat
            BackColor       =   &H00E0E0E0&
            Caption         =   "Multi-Piece"
            Enabled         =   0   'False
            Height          =   315
            Left            =   10350
            MaskColor       =   &H0080C0FF&
            Style           =   1  'Graphical
            TabIndex        =   40
            Top             =   3750
            UseMaskColor    =   -1  'True
            Width           =   990
         End
         Begin VB.ComboBox f1090 
            Height          =   315
            ItemData        =   "frmShip.frx":0BA6
            Left            =   9225
            List            =   "frmShip.frx":0BAD
            TabIndex        =   37
            Text            =   "USD"
            Top             =   3000
            Width           =   690
         End
         Begin VB.CheckBox chkDuplicate 
            BackColor       =   &H00FFFFFF&
            Caption         =   "Identical Pkgs"
            Height          =   315
            Left            =   9000
            TabIndex        =   25
            Top             =   825
            Width           =   1365
         End
         Begin VB.ComboBox f23 
            Height          =   315
            ItemData        =   "frmShip.frx":0BB6
            Left            =   8175
            List            =   "frmShip.frx":0BC3
            TabIndex        =   38
            Top             =   3375
            Width           =   3165
         End
         Begin VB.ComboBox f1273 
            Height          =   315
            Left            =   8175
            TabIndex        =   29
            Top             =   1950
            Width           =   3165
         End
         Begin VB.ComboBox f1274 
            Height          =   315
            ItemData        =   "frmShip.frx":0C03
            Left            =   8175
            List            =   "frmShip.frx":0C05
            TabIndex        =   28
            Top             =   1575
            Width           =   3165
         End
         Begin VB.TextBox f20 
            Height          =   315
            Left            =   8175
            TabIndex        =   39
            Top             =   3750
            Width           =   2115
         End
         Begin VB.TextBox f26 
            Height          =   315
            Left            =   8175
            TabIndex        =   36
            Top             =   3000
            Width           =   990
         End
         Begin VB.TextBox f24 
            ForeColor       =   &H00000000&
            Height          =   315
            Left            =   8175
            TabIndex        =   34
            Top             =   2625
            Width           =   990
         End
         Begin VB.TextBox f1670 
            Height          =   315
            Left            =   8175
            TabIndex        =   26
            Top             =   1200
            Width           =   765
         End
         Begin VB.TextBox f116 
            Height          =   315
            Left            =   8175
            TabIndex        =   24
            Text            =   "1"
            Top             =   825
            Width           =   765
         End
         Begin VB.ComboBox f75 
            Height          =   315
            ItemData        =   "frmShip.frx":0C07
            Left            =   9000
            List            =   "frmShip.frx":0C0E
            TabIndex        =   27
            Top             =   1200
            Width           =   765
         End
         Begin VB.TextBox f57 
            Height          =   315
            Index           =   0
            Left            =   8175
            TabIndex        =   30
            Top             =   2250
            Width           =   390
         End
         Begin VB.TextBox f58 
            Height          =   315
            Index           =   0
            Left            =   8775
            TabIndex        =   31
            Top             =   2250
            Width           =   390
         End
         Begin VB.TextBox f59 
            Height          =   315
            Index           =   0
            Left            =   9375
            TabIndex        =   32
            Top             =   2250
            Width           =   390
         End
         Begin VB.ComboBox f16 
            Height          =   315
            Left            =   1800
            TabIndex        =   10
            Top             =   3000
            Width           =   2175
         End
         Begin VB.TextBox f25 
            BackColor       =   &H00FFFFFF&
            Height          =   315
            Left            =   1800
            TabIndex        =   16
            Top             =   4620
            Width           =   3735
         End
         Begin VB.TextBox f13 
            ForeColor       =   &H00000000&
            Height          =   315
            Left            =   1800
            TabIndex        =   7
            Top             =   1920
            Width           =   3735
         End
         Begin VB.TextBox f14 
            Height          =   315
            Left            =   1800
            TabIndex        =   8
            Top             =   2280
            Width           =   3735
         End
         Begin VB.TextBox f15 
            Height          =   315
            Left            =   1800
            TabIndex        =   9
            Top             =   2640
            Width           =   3735
         End
         Begin VB.TextBox f17 
            Height          =   315
            Left            =   4560
            TabIndex        =   11
            Top             =   3000
            Width           =   975
         End
         Begin VB.TextBox f18 
            Height          =   315
            Left            =   1800
            TabIndex        =   12
            Top             =   3360
            Width           =   1755
         End
         Begin VB.CheckBox f440 
            BackColor       =   &H00FFFFFF&
            Caption         =   "Residential address"
            Height          =   255
            Left            =   1800
            TabIndex        =   14
            Top             =   3720
            Width           =   1695
         End
         Begin VB.TextBox f3056 
            Height          =   315
            Left            =   1800
            TabIndex        =   17
            Top             =   4980
            Width           =   3735
         End
         Begin VB.TextBox f3057 
            Height          =   315
            Left            =   1800
            TabIndex        =   18
            Top             =   5340
            Width           =   3735
         End
         Begin VB.ComboBox cboBoxName 
            Height          =   315
            Index           =   0
            Left            =   9900
            TabIndex        =   33
            Text            =   "Combo1"
            Top             =   2250
            Visible         =   0   'False
            Width           =   1440
         End
         Begin VB.ComboBox f50 
            Height          =   315
            Left            =   1800
            TabIndex        =   2
            Top             =   840
            Width           =   3735
         End
         Begin VB.ComboBox cboCompany 
            Height          =   315
            Left            =   1800
            TabIndex        =   6
            Top             =   1560
            Visible         =   0   'False
            Width           =   3735
         End
         Begin VB.TextBox f12 
            Height          =   315
            Left            =   1800
            TabIndex        =   3
            Top             =   1200
            Width           =   3735
         End
         Begin VB.TextBox f11 
            Height          =   315
            Left            =   1800
            TabIndex        =   5
            Top             =   1560
            Width           =   3735
         End
         Begin VB.TextBox f38 
            Height          =   315
            Left            =   1800
            TabIndex        =   19
            Top             =   5700
            Width           =   3735
         End
         Begin VB.ComboBox cboDept 
            Height          =   315
            Left            =   1800
            TabIndex        =   20
            Top             =   5700
            Visible         =   0   'False
            Width           =   3735
         End
         Begin VB.TextBox f1 
            Height          =   315
            Left            =   1800
            TabIndex        =   0
            Top             =   480
            Width           =   3735
         End
         Begin VB.ComboBox cboContact 
            Height          =   315
            Left            =   1800
            TabIndex        =   4
            Top             =   1200
            Visible         =   0   'False
            Width           =   3735
         End
         Begin VB.Frame fraSpecial 
            BackColor       =   &H00FFFFFF&
            BorderStyle     =   0  'None
            Height          =   2625
            Index           =   5
            Left            =   6960
            TabIndex        =   387
            Top             =   4560
            Width           =   4455
            Begin VB.TextBox f1118 
               Height          =   285
               Index           =   1
               Left            =   3240
               TabIndex        =   81
               Top             =   0
               Width           =   960
            End
            Begin VB.CommandButton cmdViewDryIce 
               Appearance      =   0  'Flat
               BackColor       =   &H00E0E0E0&
               Caption         =   "View/Edit"
               Height          =   255
               Index           =   2
               Left            =   3240
               MaskColor       =   &H0080C0FF&
               Style           =   1  'Graphical
               TabIndex        =   83
               Top             =   315
               UseMaskColor    =   -1  'True
               Width           =   960
            End
            Begin VB.CommandButton cmdViewHAL 
               Appearance      =   0  'Flat
               BackColor       =   &H00E0E0E0&
               Caption         =   "View/Edit"
               Height          =   255
               Index           =   2
               Left            =   3240
               MaskColor       =   &H0080C0FF&
               Style           =   1  'Graphical
               TabIndex        =   85
               Top             =   600
               UseMaskColor    =   -1  'True
               Width           =   960
            End
            Begin VB.CheckBox f51 
               BackColor       =   &H00FFFFFF&
               Caption         =   "Deliver Without Signature"
               Height          =   285
               Index           =   1
               Left            =   120
               TabIndex        =   80
               Top             =   0
               Width           =   2415
            End
            Begin VB.CheckBox f1268 
               BackColor       =   &H00FFFFFF&
               Caption         =   "Dry Ice"
               Height          =   285
               Index           =   2
               Left            =   120
               TabIndex        =   82
               Top             =   300
               Width           =   2415
            End
            Begin VB.CheckBox f1200 
               BackColor       =   &H00FFFFFF&
               Caption         =   "Hold at Location"
               Height          =   285
               Index           =   2
               Left            =   120
               TabIndex        =   84
               Top             =   600
               Width           =   2415
            End
            Begin VB.CheckBox f1266 
               BackColor       =   &H00FFFFFF&
               Caption         =   "Saturday Delivery"
               Height          =   285
               Index           =   1
               Left            =   120
               TabIndex        =   86
               Top             =   900
               Width           =   2415
            End
         End
         Begin VB.Frame fraSpecial 
            BackColor       =   &H00FFFFFF&
            BorderStyle     =   0  'None
            Height          =   2625
            Index           =   4
            Left            =   6960
            TabIndex        =   385
            Top             =   4560
            Width           =   4455
            Begin VB.CheckBox f3008 
               BackColor       =   &H00FFFFFF&
               Caption         =   "Auto POD"
               Height          =   285
               Index           =   2
               Left            =   120
               TabIndex        =   93
               Top             =   0
               Width           =   2415
            End
            Begin VB.CheckBox f3018 
               BackColor       =   &H00FFFFFF&
               Caption         =   "Non-Standard Packaging"
               Height          =   285
               Index           =   2
               Left            =   120
               TabIndex        =   94
               Top             =   300
               Width           =   2415
            End
            Begin VB.CheckBox f27 
               BackColor       =   &H00FFFFFF&
               Caption         =   "COD (Collect on Delivery)"
               Height          =   285
               Index           =   1
               Left            =   120
               TabIndex        =   95
               Top             =   600
               Width           =   2415
            End
            Begin VB.CommandButton cmdViewCOD 
               Appearance      =   0  'Flat
               BackColor       =   &H00E0E0E0&
               Caption         =   "View/Edit"
               Height          =   255
               Index           =   2
               Left            =   3180
               MaskColor       =   &H0080C0FF&
               Style           =   1  'Graphical
               TabIndex        =   96
               Top             =   600
               UseMaskColor    =   -1  'True
               Width           =   960
            End
         End
         Begin VB.Frame fraSpecial 
            BackColor       =   &H00FFFFFF&
            BorderStyle     =   0  'None
            Height          =   2745
            Index           =   6
            Left            =   6975
            TabIndex        =   386
            Top             =   4560
            Width           =   4455
            Begin VB.CommandButton cmdViewIPD 
               Appearance      =   0  'Flat
               BackColor       =   &H00E0E0E0&
               Caption         =   "View/Edit"
               Height          =   255
               Index           =   1
               Left            =   3225
               MaskColor       =   &H0080C0FF&
               Style           =   1  'Graphical
               TabIndex        =   397
               Top             =   1275
               UseMaskColor    =   -1  'True
               Width           =   960
            End
            Begin VB.CheckBox chkIPD 
               BackColor       =   &H00FFFFFF&
               Caption         =   "IPD"
               Height          =   240
               Index           =   1
               Left            =   150
               TabIndex        =   396
               Top             =   1275
               Width           =   840
            End
            Begin VB.CheckBox f1266 
               BackColor       =   &H00FFFFFF&
               Caption         =   "Saturday Delivery"
               Height          =   315
               Index           =   2
               Left            =   150
               TabIndex        =   391
               Top             =   900
               Width           =   2415
            End
            Begin VB.CommandButton cmdViewBSO 
               Appearance      =   0  'Flat
               BackColor       =   &H00E0E0E0&
               Caption         =   "View/Edit"
               Height          =   255
               Index           =   1
               Left            =   3240
               MaskColor       =   &H0080C0FF&
               Style           =   1  'Graphical
               TabIndex        =   92
               Top             =   600
               UseMaskColor    =   -1  'True
               Width           =   960
            End
            Begin VB.CheckBox f1174 
               BackColor       =   &H00FFFFFF&
               Caption         =   "Broker Select"
               Height          =   315
               Index           =   1
               Left            =   150
               TabIndex        =   91
               Top             =   600
               Width           =   2415
            End
            Begin VB.CheckBox f1200 
               BackColor       =   &H00FFFFFF&
               Caption         =   "Hold at Location"
               Height          =   315
               Index           =   3
               Left            =   150
               TabIndex        =   89
               Top             =   300
               Width           =   2415
            End
            Begin VB.CheckBox f1268 
               BackColor       =   &H00FFFFFF&
               Caption         =   "Dry Ice"
               Height          =   315
               Index           =   3
               Left            =   150
               TabIndex        =   87
               Top             =   0
               Width           =   2415
            End
            Begin VB.CommandButton cmdViewHAL 
               Appearance      =   0  'Flat
               BackColor       =   &H00E0E0E0&
               Caption         =   "View/Edit"
               Height          =   255
               Index           =   3
               Left            =   3240
               MaskColor       =   &H0080C0FF&
               Style           =   1  'Graphical
               TabIndex        =   90
               Top             =   300
               UseMaskColor    =   -1  'True
               Width           =   960
            End
            Begin VB.CommandButton cmdViewDryIce 
               Appearance      =   0  'Flat
               BackColor       =   &H00E0E0E0&
               Caption         =   "View/Edit"
               Height          =   255
               Index           =   3
               Left            =   3240
               MaskColor       =   &H0080C0FF&
               Style           =   1  'Graphical
               TabIndex        =   88
               Top             =   0
               UseMaskColor    =   -1  'True
               Width           =   960
            End
         End
         Begin VB.Frame fraSpecial 
            BackColor       =   &H00FFFFFF&
            BorderStyle     =   0  'None
            Height          =   2745
            Index           =   3
            Left            =   6960
            TabIndex        =   187
            Top             =   4560
            Width           =   4455
            Begin VB.CheckBox chkIPD 
               BackColor       =   &H00FFFFFF&
               Caption         =   "IPD"
               Height          =   195
               Index           =   0
               Left            =   120
               TabIndex        =   78
               Top             =   1260
               Width           =   795
            End
            Begin VB.CommandButton cmdViewIPD 
               Appearance      =   0  'Flat
               BackColor       =   &H00E0E0E0&
               Caption         =   "View/Edit"
               Height          =   255
               Index           =   0
               Left            =   3360
               MaskColor       =   &H0080C0FF&
               Style           =   1  'Graphical
               TabIndex        =   79
               Top             =   1200
               UseMaskColor    =   -1  'True
               Width           =   960
            End
            Begin VB.CommandButton cmdViewBSO 
               Appearance      =   0  'Flat
               BackColor       =   &H00E0E0E0&
               Caption         =   "View/Edit"
               Height          =   255
               Index           =   0
               Left            =   3360
               MaskColor       =   &H0080C0FF&
               Style           =   1  'Graphical
               TabIndex        =   77
               Top             =   900
               UseMaskColor    =   -1  'True
               Width           =   960
            End
            Begin VB.CheckBox f1174 
               BackColor       =   &H00FFFFFF&
               Caption         =   "Broker Select"
               Height          =   285
               Index           =   0
               Left            =   120
               TabIndex        =   76
               Top             =   900
               Width           =   2415
            End
            Begin VB.CheckBox f1332 
               BackColor       =   &H00FFFFFF&
               Caption         =   "Alcohol"
               Height          =   285
               Index           =   1
               Left            =   120
               TabIndex        =   70
               Top             =   0
               Width           =   2415
            End
            Begin VB.CheckBox f1200 
               BackColor       =   &H00FFFFFF&
               Caption         =   "Hold at Location"
               Height          =   285
               Index           =   1
               Left            =   120
               TabIndex        =   74
               Top             =   600
               Width           =   2415
            End
            Begin VB.CheckBox f1268 
               BackColor       =   &H00FFFFFF&
               Caption         =   "Dry Ice"
               Height          =   285
               Index           =   1
               Left            =   120
               TabIndex        =   72
               Top             =   300
               Width           =   2415
            End
            Begin VB.CommandButton cmdViewHAL 
               Appearance      =   0  'Flat
               BackColor       =   &H00E0E0E0&
               Caption         =   "View/Edit"
               Height          =   255
               Index           =   1
               Left            =   3360
               MaskColor       =   &H0080C0FF&
               Style           =   1  'Graphical
               TabIndex        =   75
               Top             =   600
               UseMaskColor    =   -1  'True
               Width           =   960
            End
            Begin VB.CommandButton cmdViewDryIce 
               Appearance      =   0  'Flat
               BackColor       =   &H00E0E0E0&
               Caption         =   "View/Edit"
               Height          =   255
               Index           =   1
               Left            =   3360
               MaskColor       =   &H0080C0FF&
               Style           =   1  'Graphical
               TabIndex        =   73
               Top             =   300
               UseMaskColor    =   -1  'True
               Width           =   960
            End
            Begin VB.CommandButton cmdViewAlcohol 
               Appearance      =   0  'Flat
               BackColor       =   &H00E0E0E0&
               Caption         =   "View/Edit"
               Height          =   255
               Index           =   1
               Left            =   3360
               MaskColor       =   &H0080C0FF&
               Style           =   1  'Graphical
               TabIndex        =   71
               Top             =   0
               UseMaskColor    =   -1  'True
               Width           =   960
            End
         End
         Begin VB.Frame fraSpecial 
            BackColor       =   &H00FFFFFF&
            BorderStyle     =   0  'None
            Height          =   2625
            Index           =   0
            Left            =   6960
            TabIndex        =   154
            Top             =   4560
            Width           =   4455
            Begin VB.CheckBox f1208 
               BackColor       =   &H00FFFFFF&
               Caption         =   "Signature Required"
               Height          =   285
               Left            =   120
               TabIndex        =   52
               Top             =   1800
               Width           =   2175
            End
            Begin VB.CheckBox f2382 
               BackColor       =   &H00FFFFFF&
               Caption         =   "Return Labels"
               Height          =   255
               Index           =   0
               Left            =   120
               TabIndex        =   53
               Top             =   2100
               Width           =   2175
            End
            Begin VB.TextBox f1118 
               Height          =   285
               Index           =   0
               Left            =   3360
               TabIndex        =   46
               Top             =   585
               Width           =   960
            End
            Begin VB.CommandButton cmdViewAlcohol 
               Appearance      =   0  'Flat
               BackColor       =   &H00E0E0E0&
               Caption         =   "View/Edit"
               Height          =   255
               Index           =   0
               Left            =   3360
               MaskColor       =   &H0080C0FF&
               Style           =   1  'Graphical
               TabIndex        =   42
               Top             =   0
               UseMaskColor    =   -1  'True
               Width           =   960
            End
            Begin VB.CommandButton cmdViewDryIce 
               Appearance      =   0  'Flat
               BackColor       =   &H00E0E0E0&
               Caption         =   "View/Edit"
               Height          =   255
               Index           =   0
               Left            =   3360
               MaskColor       =   &H0080C0FF&
               Style           =   1  'Graphical
               TabIndex        =   48
               Top             =   900
               UseMaskColor    =   -1  'True
               Width           =   960
            End
            Begin VB.CommandButton cmdViewCOD 
               Appearance      =   0  'Flat
               BackColor       =   &H00E0E0E0&
               Caption         =   "View/Edit"
               Height          =   255
               Index           =   0
               Left            =   3360
               MaskColor       =   &H0080C0FF&
               Style           =   1  'Graphical
               TabIndex        =   44
               Top             =   300
               UseMaskColor    =   -1  'True
               Width           =   960
            End
            Begin VB.CommandButton cmdViewHAL 
               Appearance      =   0  'Flat
               BackColor       =   &H00E0E0E0&
               Caption         =   "View/Edit"
               Height          =   255
               Index           =   0
               Left            =   3360
               MaskColor       =   &H0080C0FF&
               Style           =   1  'Graphical
               TabIndex        =   50
               Top             =   1200
               UseMaskColor    =   -1  'True
               Width           =   960
            End
            Begin VB.CheckBox f27 
               BackColor       =   &H00FFFFFF&
               Caption         =   "COD (Collect on Delivery)"
               Height          =   285
               Index           =   0
               Left            =   120
               TabIndex        =   43
               Top             =   300
               Width           =   2415
            End
            Begin VB.CheckBox f51 
               BackColor       =   &H00FFFFFF&
               Caption         =   "Deliver Without Signature"
               Height          =   285
               Index           =   0
               Left            =   120
               TabIndex        =   45
               Top             =   600
               Width           =   2415
            End
            Begin VB.CheckBox f1268 
               BackColor       =   &H00FFFFFF&
               Caption         =   "Dry Ice"
               Height          =   285
               Index           =   0
               Left            =   120
               TabIndex        =   47
               Top             =   900
               Width           =   2415
            End
            Begin VB.CheckBox f1200 
               BackColor       =   &H00FFFFFF&
               Caption         =   "Hold at Location"
               Height          =   285
               Index           =   0
               Left            =   120
               TabIndex        =   49
               Top             =   1200
               Width           =   2415
            End
            Begin VB.CheckBox f1332 
               BackColor       =   &H00FFFFFF&
               Caption         =   "Alcohol"
               Height          =   285
               Index           =   0
               Left            =   120
               TabIndex        =   41
               Top             =   0
               Width           =   2415
            End
            Begin VB.CheckBox f1266 
               BackColor       =   &H00FFFFFF&
               Caption         =   "Saturday Delivery"
               Height          =   285
               Index           =   0
               Left            =   120
               TabIndex        =   51
               Top             =   1500
               Width           =   2415
            End
         End
         Begin VB.Frame fraSpecial 
            BackColor       =   &H00FFFFFF&
            BorderStyle     =   0  'None
            Height          =   2745
            Index           =   2
            Left            =   6960
            TabIndex        =   153
            Top             =   4560
            Width           =   4455
            Begin VB.CheckBox f2382 
               BackColor       =   &H00FFFFFF&
               Caption         =   "Return Labels"
               Height          =   255
               Index           =   2
               Left            =   120
               TabIndex        =   63
               Top             =   2100
               Width           =   2175
            End
            Begin VB.CheckBox f3018 
               BackColor       =   &H00FFFFFF&
               Caption         =   "Non-Standard Packaging"
               Height          =   285
               Index           =   1
               Left            =   120
               TabIndex        =   56
               Top             =   600
               Width           =   2415
            End
            Begin VB.CommandButton cmdDateCertain 
               Appearance      =   0  'Flat
               BackColor       =   &H00E0E0E0&
               Caption         =   "View/Edit"
               Height          =   255
               Left            =   3360
               MaskColor       =   &H0080C0FF&
               Style           =   1  'Graphical
               TabIndex        =   59
               Top             =   1260
               UseMaskColor    =   -1  'True
               Width           =   960
            End
            Begin VB.CheckBox f3009 
               BackColor       =   &H00FFFFFF&
               Caption         =   "Acknowledgement of Delivery"
               Height          =   285
               Index           =   1
               Left            =   120
               TabIndex        =   55
               Top             =   300
               Width           =   2415
            End
            Begin VB.CheckBox f3008 
               BackColor       =   &H00FFFFFF&
               Caption         =   "Auto POD"
               Height          =   285
               Index           =   1
               Left            =   120
               TabIndex        =   54
               Top             =   0
               Width           =   2415
            End
            Begin VB.CheckBox f3019 
               BackColor       =   &H00FFFFFF&
               Caption         =   "Signature Service"
               Height          =   285
               Left            =   120
               TabIndex        =   57
               Top             =   900
               Width           =   2415
            End
            Begin VB.CheckBox f3020 
               BackColor       =   &H00FFFFFF&
               Caption         =   "Evening Delivery"
               Height          =   285
               Index           =   1
               Left            =   120
               TabIndex        =   60
               Top             =   1500
               Width           =   2415
            End
            Begin VB.CommandButton cmdApptDel 
               Appearance      =   0  'Flat
               BackColor       =   &H00E0E0E0&
               Caption         =   "View/Edit"
               Height          =   255
               Left            =   3360
               MaskColor       =   &H0080C0FF&
               Style           =   1  'Graphical
               TabIndex        =   62
               Top             =   1800
               UseMaskColor    =   -1  'True
               Width           =   960
            End
            Begin VB.CheckBox f3020 
               BackColor       =   &H00FFFFFF&
               Caption         =   "Date Certain Delivery"
               Height          =   285
               Index           =   0
               Left            =   120
               TabIndex        =   58
               Top             =   1200
               Width           =   2415
            End
            Begin VB.CheckBox f3020 
               BackColor       =   &H00FFFFFF&
               Caption         =   "Appointment Delivery"
               Height          =   285
               Index           =   2
               Left            =   120
               TabIndex        =   61
               Top             =   1800
               Width           =   2415
            End
         End
         Begin VB.Frame fraSpecial 
            BackColor       =   &H00FFFFFF&
            BorderStyle     =   0  'None
            Height          =   2625
            Index           =   1
            Left            =   6960
            TabIndex        =   152
            Top             =   4560
            Width           =   4455
            Begin VB.CheckBox f2382 
               BackColor       =   &H00FFFFFF&
               Caption         =   "Return Labels"
               Height          =   255
               Index           =   1
               Left            =   120
               TabIndex        =   69
               Top             =   1200
               Width           =   2175
            End
            Begin VB.CheckBox f3008 
               BackColor       =   &H00FFFFFF&
               Caption         =   "Auto POD"
               Height          =   285
               Index           =   0
               Left            =   120
               TabIndex        =   64
               Top             =   0
               Width           =   2415
            End
            Begin VB.CheckBox f3018 
               BackColor       =   &H00FFFFFF&
               Caption         =   "Non-Standard Packaging"
               Height          =   285
               Index           =   0
               Left            =   120
               TabIndex        =   66
               Top             =   600
               Width           =   2415
            End
            Begin VB.CheckBox f3009 
               BackColor       =   &H00FFFFFF&
               Caption         =   "Acknowledgement of Delivery"
               Height          =   285
               Index           =   0
               Left            =   120
               TabIndex        =   65
               Top             =   300
               Width           =   2415
            End
            Begin VB.CheckBox f27 
               BackColor       =   &H00FFFFFF&
               Caption         =   "COD (Collect on Delivery)"
               Height          =   285
               Index           =   2
               Left            =   120
               TabIndex        =   67
               Top             =   900
               Width           =   2415
            End
            Begin VB.CommandButton cmdViewCOD 
               Appearance      =   0  'Flat
               BackColor       =   &H00E0E0E0&
               Caption         =   "View/Edit"
               Height          =   255
               Index           =   1
               Left            =   3360
               MaskColor       =   &H0080C0FF&
               Style           =   1  'Graphical
               TabIndex        =   68
               Top             =   900
               UseMaskColor    =   -1  'True
               Width           =   960
            End
         End
         Begin VB.ComboBox cboCustID 
            Height          =   315
            Left            =   1800
            TabIndex        =   1
            Top             =   480
            Visible         =   0   'False
            Width           =   3735
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Pre-Assigned Trk #:"
            Height          =   315
            Index           =   34
            Left            =   6600
            TabIndex        =   395
            Top             =   525
            Width           =   1515
         End
         Begin VB.Label lbl1355 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Current IOR Facility:"
            Height          =   255
            Left            =   120
            TabIndex        =   384
            Top             =   6960
            Width           =   1575
         End
         Begin VB.Image Image1 
            Height          =   345
            Left            =   10980
            Picture         =   "frmShip.frx":0C17
            Stretch         =   -1  'True
            Top             =   2640
            Visible         =   0   'False
            Width           =   345
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Current Location:"
            Height          =   255
            Index           =   15
            Left            =   240
            TabIndex        =   244
            Top             =   6600
            Width           =   1455
         End
         Begin VB.Label Label29 
            BackColor       =   &H00FFFFFF&
            Caption         =   "Shipper Account"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H000080FF&
            Height          =   255
            Left            =   360
            TabIndex        =   243
            Top             =   6255
            Width           =   2055
         End
         Begin VB.Line Line1 
            BorderColor     =   &H000080FF&
            BorderWidth     =   2
            Index           =   4
            X1              =   360
            X2              =   5580
            Y1              =   6240
            Y2              =   6240
         End
         Begin VB.Label Label73 
            Alignment       =   2  'Center
            BackColor       =   &H00FFFFFF&
            Caption         =   "x"
            BeginProperty Font 
               Name            =   "Verdana"
               Size            =   9.75
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Index           =   0
            Left            =   9120
            TabIndex        =   186
            Top             =   2310
            Width           =   255
         End
         Begin VB.Label Label24 
            Alignment       =   2  'Center
            BackColor       =   &H00FFFFFF&
            Caption         =   "x"
            BeginProperty Font 
               Name            =   "Verdana"
               Size            =   9.75
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Index           =   0
            Left            =   8520
            TabIndex        =   185
            Top             =   2310
            Width           =   255
         End
         Begin VB.Image Image2 
            Height          =   345
            Left            =   9240
            Picture         =   "frmShip.frx":0F21
            Stretch         =   -1  'True
            Top             =   2640
            Width           =   345
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Bill Shipment to:"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   315
            Index           =   19
            Left            =   6600
            TabIndex        =   184
            Top             =   3450
            Width           =   1515
         End
         Begin VB.Label lblDecVal 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Declared Value:"
            Height          =   315
            Left            =   6600
            TabIndex        =   183
            Top             =   3075
            Width           =   1515
         End
         Begin VB.Label lblShipDate 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Ship Date:"
            Height          =   315
            Left            =   6525
            TabIndex        =   182
            Top             =   2700
            Width           =   1590
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Package Dimensions:"
            Height          =   315
            Index           =   9
            Left            =   6450
            TabIndex        =   181
            Top             =   2325
            Width           =   1665
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Service Type:"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   315
            Index           =   21
            Left            =   6600
            TabIndex        =   180
            Top             =   1650
            Width           =   1515
         End
         Begin VB.Label lblWeight 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Package Weight:"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   315
            Left            =   6450
            TabIndex        =   179
            Top             =   1275
            Width           =   1665
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Number of Pkgs:"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   315
            Index           =   22
            Left            =   6375
            TabIndex        =   178
            Top             =   900
            Width           =   1740
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Package Type:"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   315
            Index           =   20
            Left            =   6600
            TabIndex        =   177
            Top             =   2025
            Width           =   1515
         End
         Begin VB.Label lblDIMs 
            BackColor       =   &H00FFFFFF&
            Caption         =   "00 x 00 x 00 in."
            ForeColor       =   &H000080FF&
            Height          =   255
            Left            =   9960
            TabIndex        =   176
            Top             =   2340
            Width           =   1215
         End
         Begin VB.Label lblf20 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Bill-to Account #:"
            Height          =   315
            Index           =   0
            Left            =   6450
            TabIndex        =   175
            Top             =   3825
            Width           =   1665
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Country:"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Index           =   2
            Left            =   240
            TabIndex        =   172
            Top             =   900
            Width           =   1455
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Address 2:"
            Height          =   255
            Index           =   5
            Left            =   240
            TabIndex        =   171
            Top             =   2340
            Width           =   1455
         End
         Begin VB.Line Line1 
            BorderColor     =   &H000080FF&
            BorderWidth     =   2
            Index           =   5
            X1              =   6000
            X2              =   6000
            Y1              =   300
            Y2              =   7080
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Order ID:"
            Height          =   255
            Index           =   1
            Left            =   240
            TabIndex        =   170
            Top             =   540
            Width           =   1455
         End
         Begin VB.Label Label12 
            BackColor       =   &H00FFFFFF&
            Caption         =   "Package and Shipment Details"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H000080FF&
            Height          =   255
            Left            =   6360
            TabIndex        =   169
            Top             =   135
            Width           =   2775
         End
         Begin VB.Line Line1 
            BorderColor     =   &H000080FF&
            BorderWidth     =   2
            Index           =   1
            X1              =   6360
            X2              =   11520
            Y1              =   120
            Y2              =   120
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Reference:"
            Height          =   255
            Index           =   11
            Left            =   240
            TabIndex        =   168
            Top             =   4680
            Width           =   1455
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Department:"
            Height          =   255
            Index           =   14
            Left            =   240
            TabIndex        =   167
            Top             =   5760
            Width           =   1455
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Contact Name:"
            Height          =   255
            Index           =   0
            Left            =   240
            TabIndex        =   166
            Top             =   1260
            Width           =   1455
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Company Name:"
            Height          =   255
            Index           =   3
            Left            =   240
            TabIndex        =   165
            Top             =   1620
            Width           =   1455
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Address 1:"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Index           =   4
            Left            =   240
            TabIndex        =   164
            Top             =   1980
            Width           =   1455
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "City:"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Index           =   6
            Left            =   240
            TabIndex        =   163
            Top             =   2700
            Width           =   1455
         End
         Begin VB.Label lblState 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "State:"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Left            =   360
            TabIndex        =   162
            Top             =   3060
            Width           =   1335
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Zip:"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Index           =   7
            Left            =   4080
            TabIndex        =   161
            Top             =   3060
            Width           =   375
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Telephone:"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Index           =   8
            Left            =   360
            TabIndex        =   160
            Top             =   3420
            Width           =   1335
         End
         Begin VB.Line Line1 
            BorderColor     =   &H000080FF&
            BorderWidth     =   2
            Index           =   0
            X1              =   360
            X2              =   5580
            Y1              =   120
            Y2              =   120
         End
         Begin VB.Line Line1 
            BorderColor     =   &H000080FF&
            BorderWidth     =   2
            Index           =   2
            X1              =   360
            X2              =   5580
            Y1              =   4260
            Y2              =   4260
         End
         Begin VB.Label Label9 
            BackColor       =   &H00FFFFFF&
            Caption         =   "Recipient Information"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H000080FF&
            Height          =   255
            Left            =   360
            TabIndex        =   159
            Top             =   135
            Width           =   2055
         End
         Begin VB.Label Label10 
            BackColor       =   &H00FFFFFF&
            Caption         =   "Reference Information"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H000080FF&
            Height          =   255
            Left            =   360
            TabIndex        =   158
            Top             =   4275
            Width           =   2055
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "Invoice Number:"
            Height          =   255
            Index           =   13
            Left            =   240
            TabIndex        =   157
            Top             =   5400
            Width           =   1455
         End
         Begin VB.Label Label1 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00FFFFFF&
            Caption         =   "P.O. Number:"
            Height          =   255
            Index           =   12
            Left            =   240
            TabIndex        =   156
            Top             =   5040
            Width           =   1455
         End
         Begin VB.Label Label11 
            BackColor       =   &H00FFFFFF&
            Caption         =   "Special Services"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H000080FF&
            Height          =   255
            Left            =   6360
            TabIndex        =   155
            Top             =   4275
            Width           =   2055
         End
         Begin VB.Line Line1 
            BorderColor     =   &H000080FF&
            BorderWidth     =   2
            Index           =   3
            X1              =   6360
            X2              =   11520
            Y1              =   4260
            Y2              =   4260
         End
      End
   End
   Begin VB.Label lblMessage 
      Alignment       =   2  'Center
      BackColor       =   &H8000000A&
      Height          =   615
      Left            =   2460
      TabIndex        =   306
      Top             =   0
      Width           =   7035
   End
   Begin VB.Image imgLogo1 
      Height          =   630
      Left            =   9960
      Picture         =   "frmShip.frx":122B
      Top             =   -30
      Width           =   2010
   End
   Begin VB.Image imgLogo2 
      Height          =   630
      Left            =   9960
      Picture         =   "frmShip.frx":174C
      Top             =   -30
      Width           =   2010
   End
   Begin VB.Menu mnuFile 
      Caption         =   "&File"
      NegotiatePosition=   2  'Middle
      Begin VB.Menu mnuDatabases 
         Caption         =   "Databases"
         Begin VB.Menu mnuImport 
            Caption         =   "Import"
            Begin VB.Menu mnuAddressBook 
               Caption         =   "Address Book"
            End
            Begin VB.Menu mnuAltReturnAddr 
               Caption         =   "Alternate Return Addresses"
            End
            Begin VB.Menu mnuDIMs 
               Caption         =   "Box Dimensions"
            End
            Begin VB.Menu mnuCommodities 
               Caption         =   "Commodities"
            End
            Begin VB.Menu mnuDepartments 
               Caption         =   "Departments"
            End
         End
         Begin VB.Menu mnuAddEditDelete 
            Caption         =   "Add/Edit/Delete"
            Begin VB.Menu mnuAddressBookEdit 
               Caption         =   "Address Book"
            End
            Begin VB.Menu mnuAltReturnAddrEdit 
               Caption         =   "Alternate Return Addresses"
            End
            Begin VB.Menu mnuDIMsEdit 
               Caption         =   "Box Dimensions"
            End
            Begin VB.Menu mnuCommoditiesEdit 
               Caption         =   "Commodities"
            End
            Begin VB.Menu mnuDeptEdit 
               Caption         =   "Departments"
            End
         End
         Begin VB.Menu mnuPurge 
            Caption         =   "Purge"
         End
      End
   End
   Begin VB.Menu mnuSetup 
      Caption         =   "&Setup"
   End
   Begin VB.Menu mnuConnect 
      Caption         =   "&Connect"
   End
   Begin VB.Menu mnuPreAssign 
      Caption         =   "&Pre-Assign"
   End
   Begin VB.Menu mnuExit 
      Caption         =   "&Exit"
   End
End
Attribute VB_Name = "frmShip"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'
'
'
'
'2005-03-16, JFW, Enable Window controls and show in task bar.
'2005-03-16, JFW, For Canada, Recipient Tax ID, aka IRS number.
'2005-03-16, JFW, SetCAScreen called after integration changes country.  Mitigate it's impact.
'2005-03-28, JFW, Save f68 on clear screen.
'2005-03-28, JFW, New field 1266(2) on CA Intl.
'2005-03-29, JFW, Adopt source version 720.3.1
'2005-03-29, JFW, Commodity tables field order 120, 414, 1030, 1275, 119.
'2005-04-11, JFW, Recognize "already deleted" on MPS delete.
'2005-04-11, JFW, Rate quote fix for CA.
'2005-04-12, JFW, Comment out and hold this item:  Enable address lookup by default at startup.
'2005-04-13, JFW, Commodity grid heading for Total value and Part number.
'2005-08-18, JFW, P&W, Post load, carry toggle of integration vs. address book.
'2005-08-18, JFW, P&W, Carry Weight Type.
'2005-08-18, JFW, P&W, Carry Country.
'2005-08-24, JFW, AddressBook EIN.
'2005-08-24, JFW, Enhanced ship history query.
'2005-08-24, JFW, AddressBook EIN.
'2005-08-31, JFW, Set D&T pay type accordingly, f70 = f23.
'2005-12-14, JFW, Add IPD for CA on Special frame, see chkIPD and cmdViewIPD.

Option Explicit
Option Compare Text

Public WithEvents g_clsParser As clsFXRSParser  'FXRSParser class object
Attribute g_clsParser.VB_VarHelpID = -1

'2/8/05 - API function declaration to add DSN to system used in AddDSN() function.
Private Declare Function SQLConfigDataSource Lib "ODBCCP32.DLL" (ByVal _
   hwndParent As Long, ByVal fRequest As Long, ByVal _
   lpszDriver As String, ByVal lpszAttributes As String) As Long
   
Dim m_intLastColumnSort As Integer              'Used to save the column index used in sorting
Dim m_blnSortOrder As Boolean                   'Used to save the sort order
Public dblCommodityValue As Double
'

'---------------------------------------------------------------------------------------
' Procedure : Calendar1_Click()
' DateTime  : 2/18/2004
' Purpose   : Puts date selected on calendar in ShipDate field.
'---------------------------------------------------------------------------------------
'
Private Sub Calendar1_DblClick()
    f24.Text = Calendar1.Value
    Calendar1.Visible = False
End Sub
'---------------------------------------------------------------------------------------
' Procedure : Calendar2_Click()
' DateTime  : 2/18/2004
' Purpose   : Puts date selected on calendar in Export License Expiration Date field.
'---------------------------------------------------------------------------------------
'
Private Sub Calendar2_DblClick()
    f84.Text = Calendar2.Value
    Calendar2.Visible = False
End Sub
'---------------------------------------------------------------------------------------
' Procedure : Calendar3_DblClick()
' DateTime  : 3/19/2004
' Purpose   : Puts the calendar value in the Ship Date field on the Shipped List tab,
'             moves the focus so the grdshipments will get updated, then hides the calendar.
'---------------------------------------------------------------------------------------
'
Private Sub Calendar3_DblClick()
    txtShipDate = Calendar3.Value
    txtShipDate.SetFocus
    cboLocationName(1).SetFocus
    Calendar3.Visible = False
End Sub
'---------------------------------------------------------------------------------------
' Procedure : Calendar4_DblClick()
' DateTime  : 7/19/2004
' Purpose   : Puts the calendar value in the Del Date field on the Ship tab for Optimization.
'---------------------------------------------------------------------------------------
'
Private Sub Calendar4_DblClick()
    txtDelDate = Calendar4.Value
    Calendar4.Visible = False
End Sub

'---------------------------------------------------------------------------------------
' Procedure : cboBatchProfile_Click()
' DateTime  : 6/19/2004
' Purpose   : Load selected batch profile selected on Batch tab to frmSetup.
'---------------------------------------------------------------------------------------
'
Private Sub cboBatchProfile_Click()
    Call frmSetup.LoadProfile(cboBatchProfile)
End Sub
'---------------------------------------------------------------------------------------
' Procedure : cboBoxName_Click(Index As Integer)
' DateTime  : 6/28/2004
' Purpose   : Loads box DIMs for selected box name.
'---------------------------------------------------------------------------------------
'
Private Sub cboBoxName_Click(Index As Integer)
    Dim rsBoxDIMs As New ADODB.Recordset
    Dim strQuery As String
    
    On Error GoTo EH
    g_strErrorLocation = "frmShip:cboBoxName_Click"
    
    strQuery = "SELECT * FROM Dimensions WHERE BoxName = " & SingleQuotes(cboBoxName(Index))
    rsBoxDIMs.Open strQuery, g_connFSMSClient, adOpenStatic, adLockOptimistic
    
    If Not rsBoxDIMs.EOF Then
        f57(Index) = rsBoxDIMs!g_str57
        f58(Index) = rsBoxDIMs!g_str58
        f59(Index) = rsBoxDIMs!g_str59
    End If
    
Release:

    If rsBoxDIMs.State = adStateOpen Then
        rsBoxDIMs.Close
    End If
    Set rsBoxDIMs = Nothing
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation
    Resume Release
    
End Sub
'---------------------------------------------------------------------------------------
' Procedure : cboBoxName_LostFocus(Index As Integer)
' DateTime  : 7/7/2004
' Purpose   : DIMs combo on Ship & Service Quote tabs. Called on LostFocus to add or
'             update box dims
'---------------------------------------------------------------------------------------
'
Private Sub cboBoxName_LostFocus(Index As Integer)
    
    On Error GoTo EH
    g_strErrorLocation = "frmShip:cboBoxName_LostFocus"
    
    If cboBoxName(Index) <> "" And f57(Index) <> "" And f58(Index) <> "" And f59(Index) <> "" Then
        Call SaveBoxDIMs(cboBoxName(Index), f57(Index), f58(Index), f59(Index))
        Call LoadBoxDIMsCombos(cboBoxName(0), cboBoxName(0))
        Call LoadBoxDIMsCombos(cboBoxName(1), cboBoxName(1))
        Call LoadBoxDIMsCombos(frmMPS.cboBoxName)
    End If
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : cboCommodityID_Click()
' DateTime  : 2/18/2004
' Purpose   : Commodity ID combo. Gets commodity info from Commodity table.
'---------------------------------------------------------------------------------------
'
Private Sub cboCommodityID_Click()
    Dim rsQuery As String
    Dim rsCommodity As New ADODB.Recordset
    
    On Error GoTo EH
    g_strErrorLocation = "frmShip:cboCommodityID_Click"
    
    rsQuery = "SELECT * FROM Commodity WHERE CommodityID = '" & cboCommodityID & "'"
    rsCommodity.Open rsQuery, g_connFSMSClient, adOpenKeyset, adLockOptimistic
    
    If Not rsCommodity.EOF Then
        txtCommodityWgt = rsCommodity("CommodityWgt")
        f79 = rsCommodity("g_str79")
        f80(0) = rsCommodity("g_str80")
        f81 = rsCommodity("g_str81")
        f82 = 1
        f83 = rsCommodity("g_str83")
        f84 = rsCommodity("g_str84")
        f120 = rsCommodity("g_str120") & ""
        f414 = rsCommodity("g_str414") & ""
        f1030 = rsCommodity("g_str1030")
        f1275 = rsCommodity("g_str1275") & ""
    End If

Release:
    
    If rsCommodity.State = adStateOpen Then
        rsCommodity.Close
    End If
    Set rsCommodity = Nothing

   
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation
    Resume Release
    
End Sub
'---------------------------------------------------------------------------------------
' Procedure : cboCompany_KeyPress()
' DateTime  : 9/1/2004
' Purpose   : Calls routine to search combo for first matching value
'---------------------------------------------------------------------------------------
'
Private Sub cboCompany_KeyPress(KeyAscii As Integer)
        
        Call SearchCombo(cboCompany, KeyAscii)

End Sub

'---------------------------------------------------------------------------------------
' Procedure : cboCompany_LostFocus()
' DateTime  : 8/31/2004
' Purpose   : Call sub to populate recipient fields
'---------------------------------------------------------------------------------------
'
Private Sub cboCompany_LostFocus()
    
    If cboCompany <> "" And Not g_blnLookup Then
        g_blnLookup = True
        Call LoadAddrFields("f11", cboCompany)
        Call frmMPS.UpdateMPSGrid(cboCustID)
        Call AfterAddrLookup
    End If

End Sub
'---------------------------------------------------------------------------------------
' Procedure : cboContact_KeyPress()
' DateTime  : 9/1/2004
' Purpose   : Calls routine to search combo for first matching value
'---------------------------------------------------------------------------------------
'
Private Sub cboContact_KeyPress(KeyAscii As Integer)
        
        Call SearchCombo(cboContact, KeyAscii)

End Sub
'---------------------------------------------------------------------------------------
' Procedure : cboContact_LostFocus()
' DateTime  : 8/31/2004
' Purpose   : Call sub to populate recipient fields
'---------------------------------------------------------------------------------------
'
Private Sub cboContact_LostFocus()
    
    If cboContact <> "" And Not g_blnLookup Then
        g_blnLookup = True
        Call LoadAddrFields("f12", cboContact)
        Call frmMPS.UpdateMPSGrid(cboCustID)
        Call AfterAddrLookup
    End If

End Sub
'---------------------------------------------------------------------------------------
' Procedure : cboContact_LostFocus()
' DateTime  : 1/27/2005
' Purpose   : Makes sure buttons that require an OrderID/CustID are disabled if field is blank
'---------------------------------------------------------------------------------------
'
Private Sub cboCustID_Change()
    On Error GoTo EH
    g_strErrorLocation = "frmShip:cboCustID_Change"
    
    If cboCustID <> "" Then
        cmdMPS.Enabled = True
        If optCommodities Then
            cmdAddToShipment.Enabled = True
        End If
    Else
        cmdMPS.Enabled = False
        cmdAddToShipment.Enabled = False
    End If
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation


End Sub
'---------------------------------------------------------------------------------------
' Procedure : cboCustID_KeyPress()
' DateTime  : 9/1/2004
' Purpose   : Calls routine to search combo for first matching value
'---------------------------------------------------------------------------------------
'
Private Sub cboCustID_KeyPress(KeyAscii As Integer)

    Call SearchCombo(cboCustID, KeyAscii)
    
End Sub

'---------------------------------------------------------------------------------------
' Procedure : cboCustID_LostFocus()
' DateTime  : 8/31/2004
' Purpose   : Looks populates recipient fields
'---------------------------------------------------------------------------------------
'
Private Sub cboCustID_LostFocus()
    
    Dim strQuery As String
    Dim rsQuery As ADODB.Recordset
    
    App.LogEvent "Test, PreAssign, cboCustID_LostFocus, value " & cboCustID
    
    ' 2005-05-27, JFW, P&W, explicit pre-assigned tracking number
    If cboCustID <> "" And Not g_blnLookup Then
    
        App.LogEvent "Test, PreAssign, cboCustID_LostFocus, query"
        
        strQuery = "SELECT f29 FROM PreAssign WHERE f1 = " & SingleQuotes(cboCustID)
        Set rsQuery = New ADODB.Recordset
        rsQuery.Open strQuery, g_connFSMSClient, adOpenKeyset, adLockOptimistic
        If Not rsQuery.EOF Then
            f1222 = rsQuery!f29
            
            App.LogEvent "Test, PreAssign, cboCustID_LostFocus, value " & f1222
            
            If IsNumeric(cboCustID) _
            And (Len(cboCustID) = 12 Or Len(cboCustID) = 15) Then
                cboCustID = ""
                cboCustID.SetFocus
            End If
        
        Else
            App.LogEvent "Test, PreAssign, cboCustID_LostFocus, not found"
            
        End If
        rsQuery.Close
    
    Else
        App.LogEvent "Test, PreAssign, cboCustID_LostFocus, avoided, lookup test " & CStr(g_blnLookup)

    End If
        
    If cboCustID <> "" And Not g_blnLookup Then
        g_blnLookup = True
        Call LoadAddrFields("CustID", cboCustID)
        Call frmMPS.UpdateMPSGrid(cboCustID)
        Call AfterAddrLookup
    End If

End Sub
'---------------------------------------------------------------------------------------
' Procedure : cboDept_KeyPress()
' DateTime  : 2/10/2005
' Purpose   : Calls routine to search combo for first matching value
'---------------------------------------------------------------------------------------
'
Private Sub cboDept_KeyPress(KeyAscii As Integer)
    
    Call SearchCombo(cboDept, KeyAscii)

End Sub

Private Sub cboDept_LostFocus()
    Call AfterDeptLostFocus
End Sub

'---------------------------------------------------------------------------------------
' Procedure : cboDestState_Change()
' DateTime  : 8/9/2004
' Purpose   : Calls a routine to populate the entire text of selected state.
'---------------------------------------------------------------------------------------
'
Private Sub cboDestState_Change()
    If Len(cboDestState) >= 2 Then
        Call SetComboSelection(cboDestState, cboDestState)
    End If
End Sub

'---------------------------------------------------------------------------------------
' Procedure : cboLocationName_Click()
' DateTime  : 7/6/2004
' Purpose   : Location Name combo on Ship and Shipping History tabs. If clicked from
'             Ship tab, set the frmSetup Location to frmShip location (add 1 to index
'             since frmSetup has [Create New] as first item), set the Location on the
'             Shipping History to Ship tab location, then call frmSetup routines to save
'             new location information.
'             If clicked from Shipping History, update the grid.
'---------------------------------------------------------------------------------------
'
Private Sub cboLocationName_Click(Index As Integer)
    On Error GoTo EH
    g_strErrorLocation = "frmShip:cboLocationName_Click"
    
    Select Case Index
        Case 0 'Ship tab
            frmSetup.cboName.ListIndex = cboLocationName(0).ListIndex + 1
            cboLocationName(1) = cboLocationName(0)
            cboLocationName(2) = cboLocationName(0)
            Call frmSetup.SaveRegValues
            Call frmSetup.AssignSetupToGlobalVars
            Call ShowSpecialSvcs
        Case 1 'History tab
            If g_blnFormLoadComplete Then Call UpdateShipmentsGrid
        Case 2 'Service Quote tab
            frmSetup.cboName.ListIndex = cboLocationName(2).ListIndex + 1
            cboLocationName(0) = cboLocationName(2)
            cboLocationName(1) = cboLocationName(2)
            Call frmSetup.SaveRegValues
            Call frmSetup.AssignSetupToGlobalVars
            Call ShowSpecialSvcs
    End Select

    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : chkB13A_Click()
' DateTime  : 3/3/2005
' Purpose   : Show the B13A form if checked. If unchecked set the globals vars from that
'             form to empty string so they are not included in the transaction.
'---------------------------------------------------------------------------------------
'
Private Sub chkB13A_Click()
    If chkB13A = 1 Then
        frmB13A.Show vbModeless, Me
    Else
        g_str1651 = ""
        g_str1652 = ""
        g_str1653 = ""
    End If
End Sub
'---------------------------------------------------------------------------------------
' Procedure : chkDuplicate_Click()
' DateTime  : 7/18/2004
' Purpose   : Batch Error Check checkbox clicked. If selected set boolean and change
'             Ship All button caption to Error Check.
'---------------------------------------------------------------------------------------
'
Private Sub chkBatchErrorCheck_Click()
    If chkBatchErrorCheck = 1 Then
        cmdShipAll.Caption = "Error Check"
        g_blnBatchErrorCheck = True
    Else
        cmdShipAll.Caption = "Ship All"
        g_blnBatchErrorCheck = False
    End If
End Sub

'---------------------------------------------------------------------------------------
' Procedure : chkDuplicate_Click()
' DateTime  : 2/18/2004
' Purpose   : Identical Pkgs check box. If checked or pkg count < 2, disable MPS button.
'---------------------------------------------------------------------------------------
'
Private Sub chkDuplicate_Click()
    On Error GoTo EH
    g_strErrorLocation = "frmShip:chkDuplicate_Click"
    
    Dim i As Integer
    
    If f116 > 1 And chkDuplicate = 0 Then
        cmdMPS.Enabled = True
    Else
        cmdMPS.Enabled = False
    End If
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : chkEmailAlert_Click()
' DateTime  : 2/18/2004
' Purpose   : Show Email form
'---------------------------------------------------------------------------------------
'
Private Sub chkEmailAlert_Click()
    On Error GoTo EH
    g_strErrorLocation = "frmShip:chkEmailAlert_Click"
    
    If chkEmailAlert = 1 Then
        frmEmail.Show vbModeless, Me
    End If
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : chkFHDSpecial_Click()
' DateTime  : 2/18/2004
' Purpose   : Enables/disables FHD special services when selected/deselected
'---------------------------------------------------------------------------------------
'
Private Sub chkFHDSpecial_Click(Index As Integer)
    Dim i As Integer
    
    On Error GoTo EH
    g_strErrorLocation = "frmShip:chkFHDSpecial_Click"
    
    If chkFHDSpecial(Index) = 1 Then
        For i = 1 To 3
            If Index <> i Then
                chkFHDSpecial(i).Enabled = False
            End If
        Next
        If Index = 3 Then
            chkSIG = 0
            chkSIG.Enabled = False
        End If
    Else
        For i = 1 To 3
            chkFHDSpecial(i).Enabled = True
        Next
        chkSIG.Enabled = True
    End If
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub

' 2007-12-14, JFW, CI IOR
Private Sub chkIOR_Click()
    If chkIOR Then
    If g_str169 = "" Then
        frmIOR.Show vbModeless, Me
    End If
    End If
End Sub

'---------------------------------------------------------------------------------------
' Procedure : chkIPD_Click()
' DateTime  : 10/25/2004
' Purpose   : Enables/disables fields when IPD is selected/deselected.
'---------------------------------------------------------------------------------------
'
Private Sub chkIPD_Click(Index As Integer)
    
    'Added 10/21 to support IPD
    chkIPD(Abs(Index - 1)) = chkIPD(Index)
    
    With frmSetup
        If chkIPD(Index) = 1 Then
            lbl1355.Visible = True
            f1355.Visible = True
            Call LoadIORCombo(.f10, f24)
            g_blnIPD = True
            f116 = "1"
            f116.Locked = True
            f1174(0).Enabled = False
            cmdViewBSO(0).Enabled = False
            f70.Enabled = False
            f71.Enabled = False
            f72.Enabled = False
            f1358.Enabled = False
            lbl1358.Enabled = False
            lblCI(0).Enabled = False
            lblf20(1).Enabled = False
            Label1(23).Enabled = False
            Call LoadServices("18")
        Else
            lbl1355.Visible = False
            f1355.Visible = False
            g_blnIPD = False
            f116.Locked = False
            f1174(0).Enabled = True
            cmdViewBSO(0).Enabled = True
            f70.Enabled = True
            f71.Enabled = True
            f72.Enabled = True
            f1358.Enabled = True
            lbl1358.Enabled = True
            lblCI(0).Enabled = True
            lblf20(1).Enabled = True
            Label1(23).Enabled = True
            Call LoadServices(Left(f1274, 2))
        End If
    End With

End Sub

'---------------------------------------------------------------------------------------
' Procedure : cmdAddToShipment_Click()
' DateTime  : 2/18/2004
' Modified  : 3/10/2005 Removed a check
' Purpose   : Commodity Add to Shipment button. Does minimal error checking then calls
'             routines to add commodity to database, cleaer the commodity fields and
'             update the datagrid.
'---------------------------------------------------------------------------------------
'
Private Sub cmdAddToShipment_Click()
    
    On Error GoTo EH
    g_strErrorLocation = "frmShip:cmdAddToShipment_Click"
    
    If f414 = "" Then
        MsgBox "Please select a Unit of Measure", vbExclamation, "Add Commodity Error"
        f414.SetFocus
    ElseIf f80(0) = "" Then
        MsgBox "Please select a Country of Manufacture", vbExclamation, "Add Commodity Error"
        f80(0).SetFocus
    Else
        Call AddCommodityToMDB
        Call ClearCommodityFields
        'Updated 3/2/05 for Address book shipping
        If f1.Visible = True Then
            Call UpdateCommodityGrid(f1)
        Else
            Call UpdateCommodityGrid(cboCustID)
        End If
    End If
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : cmdApptDel_Click()
' DateTime  : 2/18/2004
' Purpose   : Appt Del View/Edit button. Show Appt Del form.
'---------------------------------------------------------------------------------------
'
Private Sub cmdApptDel_Click()
    On Error GoTo EH
    g_strErrorLocation = "frmShip:cmdApptDel_Click"
    
    frmApptDelivery.Show vbModeless, Me
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : cmdBrowse_Click()
' DateTime  : 2/18/2004
' Purpose   : Browse button. Show common dialog to select batch file for processing.
'---------------------------------------------------------------------------------------
'
Private Sub cmdBrowse_Click()
    On Error GoTo EH
    g_strErrorLocation = "frmShip:cmdBrowse_Click"
    
    If frmSetup.txtFilesPath <> "" Then
        cdlBatchFilename.InitDir = frmSetup.txtFilesPath
    Else
        cdlBatchFilename.InitDir = App.Path
    End If
    
    cdlBatchFilename.ShowOpen
    txtBatchFilename = cdlBatchFilename.FileName
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : ClearButton()
' DateTime  : 2/18/2004
' Purpose   : Clear button. Calls routine to clear screen fields, global vars and errors.
'---------------------------------------------------------------------------------------
'
Private Sub ClearButton()
    On Error GoTo EH
    g_strErrorLocation = "frmShip:ClearButton"
    
    If SSTab1.Tab = 2 Then
        Call ClearBatchTab
    ElseIf SSTab1.Tab = 3 Then
        Call ClearServiceQuoteTab
    ElseIf SSTab1.Tab = 4 Then
        Call ClearHistoryTab
    Else
        Call ClearShipFields
        Call ClearGlobalVars
        Call SetLogo
        g_str3 = ""
    End If
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : CloseButton()
' DateTime  : 2/18/2004
' Purpose   : Close button. Show Close form.
'---------------------------------------------------------------------------------------
'
Private Sub CloseButton()
    On Error GoTo EH
    g_strErrorLocation = "frmShip:CloseButton"
    
    Call DisableButtons
    frmClose.Show vbModeless, Me
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : cmdCustom_Click(Index As Integer)
' DateTime  : 5/11/2004
' Purpose   : One of the Custom buttons is clicked. Calls on of the three CustomButton
'             subroutines in modCustomButtons. CICs must define the functionality of
'             these buttons, and they must be enabled in the setup.
'---------------------------------------------------------------------------------------
'
Private Sub cmdCustom_Click(Index As Integer)
    On Error GoTo EH
    g_strErrorLocation = "frmShip:cmdCustom_Click"
    
    Select Case Index
        Case 1
            Call CustomButton1
        Case 2
            Call CustomButton2
        Case 3
            Call CustomButton3
    End Select
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : cmdDateCertain_Click()
' DateTime  : 2/18/2004
' Purpose   : Date Certain View/Edit button. Show Date Certain form.
'---------------------------------------------------------------------------------------
'
Private Sub cmdDateCertain_Click()
    On Error GoTo EH
    g_strErrorLocation = "frmShip:cmdDateCertain_Click"
    
    frmDateCertain.Show vbModeless, Me
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : DeleteButton()
' DateTime  : 2/18/2004
' Purpose   : Delete button. If on Shipping History send Delete transaction for each
'             row selected in grid, else show Delete form.
'---------------------------------------------------------------------------------------
'
Private Sub DeleteButton()
    Dim vntBookMark As Variant
    Dim intNumBookMarks As Integer
    Dim intAnswer As Integer
    
    On Error GoTo EH
    g_strErrorLocation = "frmShip:DeleteButton"
    
    If SSTab1.Tab = 4 Then
        intNumBookMarks = grdShipments.SelBookmarks.Count
        If intNumBookMarks > 0 Then
            'Verify
            intAnswer = MsgBox("Are you sure you want to delete these " & Str(intNumBookMarks) & " tracking numbers?", vbYesNo, "Confirm Delete")
            
            If intAnswer = vbYes Then
                For Each vntBookMark In grdShipments.SelBookmarks
                    g_blnDeletesComplete = False
                    Call DisableButtons
                    dcShipments.Recordset.Bookmark = vntBookMark
                    g_blnComplete = False
                    If optType(3) Then
                        With dcShipments.Recordset
                            Call SendData(BuildCRNDeleteTrans(.Fields(0), .Fields(2), .Fields(11)))
                        End With
                    Else
                        Call SendData(BuildDeleteTrans(dcShipments.Recordset.Fields(0)))
                    End If
                    intNumBookMarks = intNumBookMarks - 1
                    If intNumBookMarks = 0 Then
                        g_blnDeletesComplete = True
                    End If
                    'Pause until reply recieved on first delete
                    Do Until g_blnComplete
                        DoEvents
                    Loop
                Next
            End If
        End If
        Call UpdateShipmentsGrid
    Else
        Call DisableButtons
        frmDelete.Show vbModeless, Me
    End If
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : cmdError_Click()
' DateTime  : 2/18/2004
' Purpose   : Error buttons on Ser Quote form. Show FXRS error for that service.
'---------------------------------------------------------------------------------------
'
Private Sub cmdError_Click(Index As Integer)
    
    On Error GoTo EH
    g_strErrorLocation = "frmShip:cmdError_Click"
    
    Dim strErrorMsg As String
    
    With FSMSQuote1
        Select Case Index
            Case 1
                strErrorMsg = .F3_PO
            Case 2
                strErrorMsg = .F3_SO
            Case 3
                strErrorMsg = .F3_ES
            Case 4
                strErrorMsg = .F3_XS
            Case 5
                strErrorMsg = .F3_GR
            Case 6
                strErrorMsg = .F3_HD
        End Select
    End With
    
    MsgBox strErrorMsg, vbExclamation, "Service Error"

    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : cmdMenu_Click()
' DateTime  : 5/18/2004
' Purpose   : Buttons on the bottom of the screen are clicked, call appropriate sub.
'---------------------------------------------------------------------------------------
'
Private Sub cmdMenu_Click(Index As Integer)
    On Error GoTo EH
    g_strErrorLocation = "frmShip:cmdMenu_Click"
    
    Select Case Index
        Case 0
            Call ClearButton
        Case 1
            Call DeleteButton
        Case 2
            Call CloseButton
        Case 3
            Call TrackButton
        Case 4
            Call RefTrackButton
        Case 5
            Call RateButton
        Case 6
            Call ShipButton
    End Select
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : cmdMPS_Click()
' DateTime  : 3/18/2004
' Purpose   : Show MPS form
'---------------------------------------------------------------------------------------
'
Private Sub cmdMPS_Click()
    On Error GoTo EH
    g_strErrorLocation = "frmShip:cmdMPS_Click"
    
    frmMPS.Show vbModeless, Me
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : RateButton()
' DateTime  : 6/10/2004
' Purpose   : If on the Ship tab, rate the package using fields on this screen. If on
'             Rate tab, calll routine to rate all services.
'---------------------------------------------------------------------------------------
'
Private Sub RateButton()
    On Error GoTo EH
    g_strErrorLocation = "frmShip:RateButton"
    
    Call DisableButtons
    Call AssignTextToGlobal
    'Rate on Ship or Int'l tab
    If SSTab1.Tab = 0 Or SSTab1.Tab = 1 Then
        g_blnRate = True
        StatusBar1.Panels(2) = "Rating..."
        ' debug.print Now
        ' debug.print BuildRateTrans
        Call SendData(BuildRateTrans)
    'Service Quote tab
    ElseIf SSTab1.Tab = 3 Then
        StatusBar1.Panels(2) = "Quoting..."
        Call QuoteConnect
    End If
    Call ClearGlobalVars
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : cmdSearch_Click()
' DateTime  : 6/10/2004
' Purpose   : Search button on Shipping History clicked. Update grid passing search field
'             and value.
'---------------------------------------------------------------------------------------
'
Private Sub cmdSearch_Click()
    On Error GoTo EH
    g_strErrorLocation = "frmShip:cmdSearch_Click"
    
    Call UpdateShipmentsGrid(cboSearchField, txtSearchValue)
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : cmdShipAll_Click()
' DateTime  : 2/18/2004
' Purpose   : For batch all, disable other FXRS function buttons, process the batchfile,
'             then enable the other FXRS buttons.
'---------------------------------------------------------------------------------------
'
Private Sub cmdShipAll_Click()
    
    On Error GoTo EH
    g_strErrorLocation = "frmShip:cmdShipAll_Click"
    
        If txtBatchFilename = "" Then
            MsgBox "Please Enter or Select a Batch Filename", vbExclamation, "Filename Error"
            txtBatchFilename.SetFocus
            Exit Sub
        End If
        
        Call ClearBatchTab
        Call DisableButtons
        g_blnBatch = True
        cmdAbortBatch.Enabled = True
        
        'Save the Batch Filename
        g_clsReg.SetRegistryValue "BatchFilename", txtBatchFilename, REG_SZ
        
        frmShip.StatusBar1.Panels(2) = "Processing batch..."
        Call ProcessBatch(txtBatchFilename)
        'Batch done set button and batch flag
        Call EnableButtons
        g_blnBatch = False
        If g_blnAbortBatch Then
            MsgBox "Processing Aborted", vbExclamation, "Batch Processing"
            frmShip.StatusBar1.Panels(2) = "Batch Aborted"
            g_blnAbortBatch = False
        Else
            MsgBox "Processing Complete", vbExclamation, "Batch Processing"
            frmShip.StatusBar1.Panels(2) = "Batch Complete"
        End If
        cmdAbortBatch.Enabled = False
        
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : cmdAbortBatch_Click()
' DateTime  : 4/30/2004
' Purpose   : Aborts Batch processing
'---------------------------------------------------------------------------------------
'
Private Sub cmdAbortBatch_Click()
    On Error GoTo EH
    g_strErrorLocation = "frmShip:cmdAbortBatch_Click"
    
    g_blnAbortBatch = True
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : TrackButton()
' DateTime  : 6/10/2004
' Purpose   : Calls TrackIt to track by trk#
'---------------------------------------------------------------------------------------
'
Private Sub TrackButton()
    On Error GoTo EH
    g_strErrorLocation = "frmShip:TrackButton"
    
    Call TrackIt(grdShipments.Columns(0))
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : RefTrackButton()
' DateTime  : 6/10/2004
' Purpose   : Calls TrackItRef and passes the appropriate reference, reftype & acct#
'---------------------------------------------------------------------------------------
'
Private Sub RefTrackButton()
    Dim blnRefNotEmpty(4) As Boolean
    Dim intCount As Integer
    Dim i As Integer
    Dim strRefType(4) As String
    Dim strQuery As String
    Dim strAcctNum As String
    Dim rsAcctNum As New ADODB.Recordset
    
    On Error GoTo EH
    g_strErrorLocation = "frmShip:RefTrackButton"
    
    strRefType(1) = "ground_reference"
    strRefType(2) = "ground_po"
    strRefType(3) = "ground_invoice"
    
    'Get acct# for query
    If cboLocationName(1) = frmSetup.cboName Then
        strAcctNum = frmSetup.f10
    Else
        strQuery = "SELECT f10 FROM Meters WHERE Name = " & SingleQuotes(cboLocationName(1))
        rsAcctNum.Open strQuery, g_connFSMSClient, adOpenKeyset, adLockOptimistic
        If Not rsAcctNum.EOF Then
            strAcctNum = rsAcctNum!f10
        End If
        rsAcctNum.Close
    End If

    If optType(1) Then
        intCount = 0
        For i = 1 To 3
            If grdShipments.Columns(i) <> "" Then
                blnRefNotEmpty(i) = True
                intCount = intCount + 1
            End If
        Next
        If intCount = 1 Then
            For i = 1 To 3
                If blnRefNotEmpty(i) = True Then
                    Call TrackItRef(grdShipments.Columns(i), strRefType(i), strAcctNum)
                End If
            Next
        ElseIf intCount > 1 Then
            frmTrackGroundRef.Show vbModeless, Me
            For i = 1 To 3
                If blnRefNotEmpty(i) = True Then
                    frmTrackGroundRef.optRefType(i).Enabled = True
                Else
                    frmTrackGroundRef.optRefType(i).Enabled = False
                End If
            Next
        End If
    Else
        If grdShipments.Columns(0) <> "" Then
            Call TrackItRef(grdShipments.Columns(1), "express_reference", strAcctNum)
        End If
    End If
    
Release:
    If rsAcctNum.State = adStateOpen Then rsAcctNum.Close
    Set rsAcctNum = Nothing

    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation
    Resume Release

End Sub
'---------------------------------------------------------------------------------------
' Procedure : cmdViewAlcohol_Click(index As Integer)
' DateTime  : 3/16/2004
' Purpose   : Show Alcohol form, Dom and Intl.
'---------------------------------------------------------------------------------------
'
Private Sub cmdViewAlcohol_Click(Index As Integer)
    On Error GoTo EH
    g_strErrorLocation = "frmShip:cmdViewAlcohol_Click"
    
    frmAlcohol.Show vbModeless, Me
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : cmdViewBSO_Click()
' DateTime  : 3/16/2004
' Purpose   : Show BSO form.
'---------------------------------------------------------------------------------------
'
Private Sub cmdViewBSO_Click(Index As Integer)
    On Error GoTo EH
    g_strErrorLocation = "frmShip:cmdViewBSO_Click"
    
    frmBSO.Show vbModeless, Me
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : cmdViewCOD_Click(index As Integer)
' DateTime  : 3/16/2004
' Purpose   : Show COD form, Dom and Intl.
'---------------------------------------------------------------------------------------
'
Private Sub cmdViewCOD_Click(Index As Integer)
    On Error GoTo EH
    g_strErrorLocation = "frmShip:cmdViewCOD_Click"
    
    With frmCOD
        If Left(f1274, 2) = "92" Then
                .optCollectType(2).Visible = True
                .optCollectType(0).Caption = "Any funds"
                .optCollectType(1).Caption = "Secured funds ONLY"
                .f3014.Visible = True
                .chkCOD1stPiece.Visible = True
        Else
                .optCollectType(2).Visible = False
                .optCollectType(0).Caption = "Secured Check"
                .optCollectType(1).Caption = "Non-Secured Check"
                .f3014.Visible = False
                .chkCOD1stPiece.Visible = False
        End If
        .Show vbModeless, Me
    End With
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : cmdViewDryIce_Click(index As Integer)
' DateTime  : 3/16/2004
' Purpose   : Show Dry Ice form, Dom and Intl.
'---------------------------------------------------------------------------------------
'
Private Sub cmdViewDryIce_Click(Index As Integer)
    On Error GoTo EH
    g_strErrorLocation = "frmShip:cmdViewDryIce_Click"
    
    frmDryIce.Show vbModeless, Me
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : cmdViewHAL_Click()
' DateTime  : 3/16/2004
' Purpose   : Show Domestic HAL form.
'---------------------------------------------------------------------------------------
'
Private Sub cmdViewHAL_Click(Index As Integer)
    On Error GoTo EH
    g_strErrorLocation = "frmShip:cmdViewHAL_Click"
    
    frmHAL.Show vbModeless, Me
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub

' 2007-12-14, JFW, CI IOR
Private Sub cmdViewIOR_Click()
    frmIOR.Show vbModeless, Me
End Sub

'---------------------------------------------------------------------------------------
' Procedure : cmdViewIPD_Click()
' DateTime  : 11/10/2004
' Purpose   : Show IPD form.
'---------------------------------------------------------------------------------------
'
Private Sub cmdViewIPD_Click(Index As Integer)
    frmIPD.Show vbModeless, Me
End Sub
'---------------------------------------------------------------------------------------
' Procedure : f1_Change()
' DateTime  : 3/16/2004
' Purpose   : Enables/disables buttons that require an Order ID
'---------------------------------------------------------------------------------------
'
Private Sub f1_Change()
    On Error GoTo EH
    g_strErrorLocation = "frmShip:f1_Change"
    
    If f1 <> "" Then
        cmdMPS.Enabled = True
        If optCommodities Then
            cmdAddToShipment.Enabled = True
        End If
    Else
        cmdMPS.Enabled = False
        cmdAddToShipment.Enabled = False
    End If
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : f1_LostFocus()
' DateTime  : 3/16/2004
' Purpose   : Get order info if Order ID field not empty.
'---------------------------------------------------------------------------------------
'
Private Sub f1_LostFocus()
    On Error GoTo EH
    g_strErrorLocation = "frmShip:f1_LostFocus"
    
    Dim strQuery As String
    Dim rsQuery As ADODB.Recordset
    
    App.LogEvent "Test, PreAssign, f1_LostFocus, value " & f1
    
    ' 2005-05-27, JFW, P&W, explicit pre-assigned tracking number
    If f1 <> "" And Not g_blnLookup Then
    
        App.LogEvent "Test, PreAssign, f1_LostFocus, query"
        
        strQuery = "SELECT f29 FROM PreAssign WHERE f1 = " & SingleQuotes(f1)
        Set rsQuery = New ADODB.Recordset
        rsQuery.Open strQuery, g_connFSMSClient, adOpenKeyset, adLockOptimistic
        If Not rsQuery.EOF Then
            f1222 = rsQuery!f29
            
            App.LogEvent "Test, PreAssign, f1_LostFocus, assigned value " & f1222
            
            If IsNumeric(f1) _
            And (Len(f1) = 12 Or Len(f1) = 15) Then
                f1 = ""
                f1.SetFocus
            End If
        
        Else
            App.LogEvent "Test, PreAssign, f1_LostFocus, not found"
            
        End If
        rsQuery.Close
    
    Else
        App.LogEvent "Test, PreAssign, f1_LostFocus, avoided, lookup test " & CStr(g_blnLookup)
        
    End If
    
    If Not g_blnLockOrderID Then
        If f1 <> "" Then
            If GetData(f1) Then
                g_blnLockOrderID = True
                Call frmMPS.UpdateMPSGrid(f1)
                StatusBar1.Panels(2) = ""
            Else
                StatusBar1.Panels(2) = "Order " & f1 & " Not Found"
            End If
        End If
    End If

    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : f1030_Change()
' DateTime  : 3/16/2004
' Purpose   : Commodity Unit Value is numeric, decimal allowed with a max length of 16.
'---------------------------------------------------------------------------------------
'
Private Sub f1030_Change()
    On Error GoTo EH
    g_strErrorLocation = "frmShip:f1030_Change"
    
    Call NumericOnly(f1030, True)
    Call CheckLength(f1030, 16)
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : f1030_LostFocus()
' DateTime  : 3/16/2004
' Purpose   : Commodity Unit Value is formatted to 6 decimal places then Customs Value
'             calculated.
'---------------------------------------------------------------------------------------
'
Private Sub f1030_LostFocus()
    On Error GoTo EH
    g_strErrorLocation = "frmShip:f1030_LostFocus"
    
    Call CalcCustomsValue
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub


'---------------------------------------------------------------------------------------
' Procedure : f1118_Change()
' DateTime  : 3/16/2004
' Purpose   : Signature Release Number is numeric, no decimals allowed.
'---------------------------------------------------------------------------------------
'
Private Sub f1118_Change(Index As Integer)
    On Error GoTo EH
    g_strErrorLocation = "frmShip:f1118_Change"
    
    f1118(Index).BackColor = &HFFFFFF
    Call NumericOnly(f1118(Index), False)
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub

Private Sub f113_Click()

    On Error Resume Next
    Dim i As Long
    
    If f113 Then
        g_str113 = "Y"
        'frmShip.fraCI.Enabled = True
        For i = 0 To frmShip.lblCI.UBound
            frmShip.lblCI(i).Enabled = True
        Next
    Else
        g_str113 = ""
        'Disable CI fields
        'frmShip.fraCI.Enabled = False
        For i = 0 To frmShip.lblCI.UBound
            frmShip.lblCI(i).Enabled = False
        Next
    End If
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub

'---------------------------------------------------------------------------------------
' Procedure : f116_Change()
' DateTime  : 3/16/2004
' Purpose   : Num of Pkgs is numeric, no decimal allowed.
'---------------------------------------------------------------------------------------
'
Private Sub f116_Change()
    Dim i As Integer
    
    On Error GoTo EH
    g_strErrorLocation = "frmShip:f116_Change"
    
    Call NumericOnly(f116, False)
    
    'Don't allow return labels for MPS or duplicates
    If Val(f116) > 1 Then
        For i = 0 To 2
            f2382(i) = 0
            f2382(i).Enabled = False
        Next
        If optDocument Then chkDuplicate = 1
    Else
        For i = 0 To 2
            f2382(i).Enabled = True
        Next
        If optDocument Then chkDuplicate = 0
    End If
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : f119_Change()
' DateTime  : 3/16/2004
' Purpose   : Customs Value is numeric with decimal allowed and a max length of 12.
'---------------------------------------------------------------------------------------
'
Private Sub f119_Change()
    On Error GoTo EH
    g_strErrorLocation = "frmShip:f119_Change"
    
    Call NumericOnly(f119, True)
    Call CheckLength(f119, 12)
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub


'---------------------------------------------------------------------------------------
' Procedure : f1208_Click()
' DateTime  : 7/26/2004
' Purpose   : Signature Required clicked. If checked clear Signature Release
'---------------------------------------------------------------------------------------
'
Private Sub f1208_Click()
    On Error GoTo EH
    g_strErrorLocation = "frmShip:f1208_Click"
    
    If f1208 = 1 Then
        f51(0) = 0
        f1118(0) = ""
    End If
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub

'---------------------------------------------------------------------------------------
' Procedure : f1273_Change()
' DateTime  : 8/9/2004
' Purpose   : Calls a routine to populate the entire text of selected pkg type.
'---------------------------------------------------------------------------------------
'
Private Sub f1273_Change()
    
    If Len(f1273) >= 2 Then
        Call SetComboSelection(f1273, f1273)
    End If

    ' 2005-08-28, JFW
    If f1273 & "" <> "" Then Call g_clsReg.SetRegistryValue("PackageType", Left(f1273 & "", 2), REG_SZ)

End Sub

' 2005-09-01
Private Sub f1273_Click()

    ' 2005-08-28, JFW
    If f1273 & "" <> "" Then Call g_clsReg.SetRegistryValue("PackageType", Left(f1273 & "", 2), REG_SZ)

End Sub

'---------------------------------------------------------------------------------------
' Procedure : f1274_Change()
' DateTime  : 3/16/2004
' Purpose   : Service type field - if length is greater than 2 then enable Email button
'             and call ShowSpecialSvcs.
'---------------------------------------------------------------------------------------
'
Private Sub f1274_Change()
    On Error GoTo EH
    g_strErrorLocation = "frmShip:f1274_Change"
    
    
    If Len(f1274) >= 2 Then
        Call SetComboSelection(f1274, f1274)
    Else
        chkEmailAlert.Enabled = False
    End If
    
    ' 2005-08-28, JFW
    If f1274 & "" <> "" Then Call g_clsReg.SetRegistryValue("ServiceType", Left(f1274 & "", 2), REG_SZ)
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub

'---------------------------------------------------------------------------------------
' Procedure : f1274_Click()
' DateTime  : 3/16/2004
' Purpose   : Service type field - if length is greater than 2 then enable Email button
'             and call ShowSpecialSvcs.
'---------------------------------------------------------------------------------------
'
Private Sub f1274_Click()
    On Error GoTo EH
    g_strErrorLocation = "frmShip:f1274_Click"
    
    If Len(f1274) >= 2 Then
        chkEmailAlert.Enabled = True
        Call ShowSpecialSvcs
        Call SetLogo
        Call LoadPaymentTypeCombo(f23)
    Else
        chkEmailAlert.Enabled = False
    End If
    
    ' 2005-08-28, JFW
    Call g_clsReg.SetRegistryValue("ServiceType", Left(f1274 & "", 2), REG_SZ)
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub

'---------------------------------------------------------------------------------------
' Procedure : f16_Change(), f16_Click
' DateTime  : 7/13/2004
' Purpose   : If state code is PR, call routine to update to Intl screen
'---------------------------------------------------------------------------------------
'
Private Sub f16_Change()
    On Error GoTo EH
    g_strErrorLocation = "frmShip:f16_Change"

    If Len(f16) >= 2 Then
        Call SetComboSelection(f16, f16)
    End If
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
Private Sub f16_Click()
    On Error GoTo EH
    g_strErrorLocation = "frmShip:f16_Click"

    Call DomIntlScreenLayout
    Call LoadServices(Left(f1274, 2))
    Call LoadPackaging(Left(f1273, 2))
    Call ShowSpecialSvcs

    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : f24_Change
' DateTime  : 10/6/2004
' Purpose   : Highlights the Ship Date field if Future Day Shipping
'---------------------------------------------------------------------------------------
'
Private Sub f24_Change()
        
    If IsDate(f24) Then
        If DateDiff("d", Date, CDate(f24)) > 0 Then
            f24.BackColor = &HC0E0FF
        ElseIf DateDiff("d", Date, CDate(f24)) < 0 Then
            f24 = Date
            Calendar1.Today
        Else
            f24.BackColor = &HFFFFFF
        End If
        
        'Added 2/2/05 to support future day IPD
        Call LoadIORCombo(frmSetup.f10, f24)
   End If
End Sub

'---------------------------------------------------------------------------------------
' Procedure : f37_MouseMove, f1528_MouseMove, f1598_MouseMove, & f1599_MouseMove
' DateTime  : 6/28/2004
' Purpose   : These 4 routines call ShowRateDetails when these fields are moused over.
'             ShowRateDetails populates the Rate Details boxes on the Service Quote tab.
'---------------------------------------------------------------------------------------
'
Private Sub f37_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
    On Error GoTo EH
    g_strErrorLocation = "frmShip:f37_MouseMove"
    
    If f37(Index) <> "" Then
        Call ShowRateDetails(Index)
    End If
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub

Private Sub f1528_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
    On Error GoTo EH
    g_strErrorLocation = "frmShip:cboBoxName_LostFocus"
    
    If f1528(Index) <> "" Then
        Call ShowRateDetails(Index)
    End If
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub

Private Sub f1598_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
    On Error GoTo EH
    g_strErrorLocation = "frmShip:cboBoxName_LostFocus"
    
    If f1598(Index) <> "" Then
        Call ShowRateDetails(Index)
    End If
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub

Private Sub f1599_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
    On Error GoTo EH
    g_strErrorLocation = "frmShip:cboBoxName_LostFocus"
    
    If f1599(Index) <> "" Then
        Call ShowRateDetails(Index)
    End If
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : f17_Change()
' DateTime  : 3/16/2004
' Purpose   : Recipient ZIP has a max length of 10
'---------------------------------------------------------------------------------------
'
Private Sub f17_Change()
    On Error GoTo EH
    g_strErrorLocation = "frmShip:f17_Change"
    
    Call CheckLength(f17, 10)
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : f18_Change()
' DateTime  : 3/16/2004
' Purpose   : Recipient phone # is numeric with max length of 15.
'---------------------------------------------------------------------------------------
'
Private Sub f18_Change()
    On Error GoTo EH
    g_strErrorLocation = "frmShip:f18_Change"
    
    Call NumericOnly(f18, False)
    Call CheckLength(f18, 15)
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : f20_Change()
' DateTime  : 3/16/2004
' Purpose   : Acct# is numeric with max length of 9
'---------------------------------------------------------------------------------------
'
Private Sub f20_Change()
    On Error GoTo EH
    g_strErrorLocation = "frmShip:f20_Change"
    
    f20.BackColor = &HFFFFFF
    Call NumericOnly(f20, False)
    Call CheckLength(f20, 9)
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : f20_LostFocus()
' DateTime  : 3/16/2004
' Purpose   : Validate Billing acct# and give error if not valid. If blank, set acct#
'             back to Bill Shipper and set focus on Billing Type field.
'---------------------------------------------------------------------------------------
'
Private Sub f20_LostFocus()
    On Error GoTo EH
    g_strErrorLocation = "frmShip:f20_LostFocus"
    
    If Not AcctNumCheckOK(f20) Then
        f20.BackColor = &HC0E0FF
        If f20 <> "" Then
            MsgBox "Invalid FedEx Account Number", vbExclamation, "Ship Error"
            f20.SetFocus
        ' 2005-08-31, JFW, Pass on to f71
        End If
    Else
        f71 = f20
    End If
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : f1670_Change()
' DateTime  : 3/16/2004
' Purpose   : Weight field is numeric, allow decimal.
'---------------------------------------------------------------------------------------
'
Private Sub f1670_Change()
    On Error GoTo EH
    g_strErrorLocation = "frmShip:f1670_Change"
    
    Call NumericOnly(f1670, True)
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : f1670_GotFocus()
' DateTime  : 3/16/2004
' Purpose   : Weight field, if configured for a scale, read the weight. Set return label
'             weight field.
'---------------------------------------------------------------------------------------
'
Private Sub f1670_GotFocus()
    On Error GoTo EH
    g_strErrorLocation = "frmShip:f1670_GotFocus"
    
    If frmSetup.chkScaleConnected = 1 Then
        f1670 = ReadScale(Right(frmSetup.cmbScalePort, 1))
    End If
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : f23_Change()
' DateTime  : 8/9/2004
' Purpose   : Calls a routine to populate the entire text of selected payment type.
'---------------------------------------------------------------------------------------
'
Private Sub f23_Change()
    If Len(f23) >= 1 Then
        Call SetComboSelection(f23, f23)
    End If
    ' 2005-08-31, JFW, Set D&T pay type accordingly, f70 = f23.
    If Len(f23) >= 1 Then
        Call SetComboSelection(f70, Left(f23, 1))
    End If
End Sub

'---------------------------------------------------------------------------------------
' Procedure : f23_Click()
' DateTime  : 3/16/2004
' Purpose   : Billing Type if 2 or 3 are selected highlight Billing Acct# field, and
'             set focus to it, else disable acct# field.
'---------------------------------------------------------------------------------------
'
Private Sub f23_Click()
    On Error GoTo EH
    g_strErrorLocation = "frmShip:f23_Click"
    
    If Left(f23, 1) <> "1" And Left(f1274, 2) <> "92" And Left(f1274, 2) <> "90" Then
        f20.Enabled = True
        If Len(f20) = 0 Then
            f20.BackColor = &HC0E0FF
            f20.SetFocus
        End If
    ElseIf (Left(f23, 1) = "3" Or Left(f23, 1) = "5") And (Left(f1274, 2) = "92" Or Left(f1274, 2) = "90") Then
        f20.Enabled = True
        If Len(f20) = 0 Then
            f20.BackColor = &HC0E0FF
            f20.SetFocus
        End If
    Else
        f20.Enabled = False
        f20 = ""
        f20.BackColor = &HFFFFFF
    End If
    
    ' 2005-08-31, JFW, Set D&T pay type accordingly, f70 = f23.
    If Len(f23) >= 1 Then
        Call SetComboSelection(f70, Left(f23, 1))
    End If
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : f26_Change()
' DateTime  : 3/16/2004
' Purpose   : Delcared Value is numeric only, no decimals.
'---------------------------------------------------------------------------------------
'
Private Sub f26_Change()
    On Error GoTo EH
    g_strErrorLocation = "frmShip:f26_Change"
    
    Call NumericOnly(f26, False)
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : f27_Click(index As Integer)
' DateTime  : 3/16/2004
' Purpose   : COD Flag if checked chkDuplicate is cleared and disabled, and signature
'             release fields are disabled.
'---------------------------------------------------------------------------------------
'
Private Sub f27_Click(Index As Integer)
    On Error GoTo EH
    g_strErrorLocation = "frmShip:f27_Click"
    
    If Index <> 2 Then
        If f27(Index) Then
            chkDuplicate = 0
            chkDuplicate.Enabled = False
            f51(Index) = 0
            f51(Index).Enabled = False
            f1118(Index).Enabled = False
        Else
            If Not optCommodities Then chkDuplicate.Enabled = True
            f51(Index).Enabled = True
            f1118(Index).Enabled = True
        End If
    End If
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : f3020_Click
' DateTime  : 3/16/2004
' Purpose   : FHD Special svcs. If one is selected the others are disabled. Sig Svc is
'             disabled if Appt Del is selected.
'---------------------------------------------------------------------------------------
'
Private Sub f3020_Click(Index As Integer)
    Dim i As Integer
    
    On Error GoTo EH
    g_strErrorLocation = "frmShip:f3020_Click"
    
    For i = 0 To 2
        If f3020(Index) <> 1 Or i = Index Then
            f3020(i).Enabled = True
        Else
            f3020(i).Enabled = False
        End If
    Next
    If Index = 2 Then
        If f3020(2) = 1 Then
            f3019 = 0
            f3019.Enabled = False
        Else
            f3019.Enabled = True
        End If
    End If
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : f38_LostFocus
' DateTime  : 2/21/2005
' Purpose   : Calls hook to run after department field loses focus
'---------------------------------------------------------------------------------------
'
Private Sub f38_LostFocus()
    Call AfterDeptLostFocus
End Sub
'---------------------------------------------------------------------------------------
' Procedure : f414_KeyPress
' DateTime  : 2/23/2005
' Purpose   : Call routine to search combo
'---------------------------------------------------------------------------------------
'
Private Sub f414_KeyPress(KeyAscii As Integer)
    Call SearchCombo(f414, KeyAscii)
End Sub

'---------------------------------------------------------------------------------------
' Procedure : f50_Change()
' DateTime  : 3/16/2004
' Purpose   : After Country is at least 2 characters call routines to set populate
'             the selection text.
'---------------------------------------------------------------------------------------
'
Private Sub f50_Change()
    On Error GoTo EH
    g_strErrorLocation = "frmShip:f50_Change"
    
    If Len(f50) >= 2 Then
        Call SetComboSelection(f50, f50)
    End If
    
    ' 2005-08-18, JFW
    Call g_clsReg.SetRegistryValue("RecipientCountry", f50 & "", REG_SZ)
    
    Call AfterLostFocus(f50)
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : f50_Click()
' DateTime  : 1/27/2005
' Purpose   : After Country is selected call routines to set screen fields
'---------------------------------------------------------------------------------------
'
Private Sub f50_Click()
    On Error GoTo EH
    g_strErrorLocation = "frmShip:f50_Click"
    
    Call DomIntlScreenLayout
    Call LoadServices(Left(f1274, 2))
    Call LoadPackaging(Left(f1273, 2))
    Call ShowSpecialSvcs
    If Left(f50, 2) = "US" Then
        Call LoadStates(f16, f16)
    ElseIf Left(f50, 2) = "CA" Then
        Call LoadProvinces(f16, f16)
    Else
        f16.Clear
    End If
    
    Call AfterLostFocus(f50)
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : DomIntlScreenLayout()
' DateTime  : 1/27/2005
' Purpose   : Call routines to set the screen fields for Domestic or Intl
' Call from : f50_Change(), f50_Click()
'---------------------------------------------------------------------------------------
'
Public Sub DomIntlScreenLayout()
    
    On Error GoTo EH
    g_strErrorLocation = "frmShip:DomIntlScreenLayout"
     
    If Left(frmSetup.f117, 2) = "CA" Then
        Call SetCAScreen
    Else
        Call SetUSScreen
    End If
        
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : SetUSScreen()
' DateTime  : 1/27/2005
' Purpose   : Set the screen fields for Domestic or Intl
' Call from : DomIntlScreenLayout()
'---------------------------------------------------------------------------------------
'
Private Sub SetUSScreen()
    
    On Error GoTo EH
    g_strErrorLocation = "frmShip:SetUSScreen"
    
    Dim strProvTemp As String
    Dim strSave As String
    
    If Left(f50, 2) = "US" And Left(f16, 2) <> "PR" Then
        'Disable Intl tab
        SSTab1.TabEnabled(1) = False
        
        'Change captions for wgt and DV
        lblWeight.Caption = "Package Weight:"
        lblDecVal.Caption = "Declared Value:"
        lblDecVal.FontBold = False
        
        'Change label to state and make bold
        lblState = "State:"
        lblState.FontBold = True
        
        'Clear wgt type and load only LBS
        ' 2005-08-18, JFW, save current weight type
        If f75 & "" <> "" Then g_clsReg.SetRegistryValue "WeightType", f75 & "", REG_SZ
        f75.Clear
        f75.AddItem "KGS"
        f75.AddItem "LBS"
        f75 = g_clsReg.GetRegistryValue("WeightType", "")
        
        'Clear currency type and load only USD
        f68.Clear
        f68.AddItem "USD"
        f68 = "USD"             '2005-03-29, JFW
        
        'Hide Intl Doc and Commodities option buttons
        optDocument.Visible = False
        optCommodities.Visible = False
        
        'Make Identical pkgs checkbox visible
        chkDuplicate.Enabled = True
        
        'Load states combo
        'Call LoadStates(f16)
        lbl1355.Visible = False
        f1355.Visible = False
        chkIPD(0) = 0
        chkIPD(1) = 0
    Else
        'Enable Intl Tab
        SSTab1.TabEnabled(1) = True
        
        'Change Weight and Declared Value Labels
        lblWeight.Caption = "Shipment Weight:"
        lblDecVal.Caption = "Carriage Value:"
        lblDecVal.FontBold = True
        
        'Add KGS to Weight Type
        ' 2005-08-18, JFW, save current weight type
        If f75 & "" <> "" Then g_clsReg.SetRegistryValue "WeightType", f75 & "", REG_SZ
        f75.Clear
        f75.Clear
        f75.AddItem "KGS"
        f75.AddItem "LBS"
        f75 = g_clsReg.GetRegistryValue("WeightType", "")
                
        'Copy Destination Country to Ultimate Destination Country
        f74 = f50
        
        'Add Intl Currency Types to Declared Value
        strSave = f68                               '2005-03-29, JFW
        f68.Clear
        Call LoadCurrencies(f68)
        If strSave <> "" Then f68 = strSave         '2005-03-29, JFW
        
        'Make the Intl radio buttons visible
        optDocument.Visible = True
        optCommodities.Visible = True
        optCommodities.Value = True
        
        'If not PR save the province, clear US states, then restore province
        If Left(f16, 2) <> "PR" And Left(f50, 2) <> "CA" Then
            strProvTemp = f16
            f16.Clear
            f16 = strProvTemp
        Else
            lbl1355.Visible = False
            f1355.Visible = False
            chkIPD(0) = 0
            chkIPD(1) = 0
        End If
        
        'Change state label and turn off bold
        lblState = "State/Prov:"
        lblState.FontBold = False
        
        'Make Identical pkgs checkbox grayed
        chkDuplicate.Enabled = False
    End If
    
    ' 2005-08-18, JFW, don't reset
    ' f75.ListIndex = 0
    f75 = g_clsReg.GetRegistryValue("WeightType", "")
    If f75 & "" = "" Then f75.ListIndex = 0
    
    If f68.ListIndex = -1 Then f68.ListIndex = 0                '2005-03-29, JFW

    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : SetCAScreen()
' DateTime  : 1/27/2005
' Purpose   : Set the screen fields for Intra-Canadian or Canadian Export
' Call from : DomIntlScreenLayout()
'---------------------------------------------------------------------------------------
'
Private Sub SetCAScreen()
    
    On Error GoTo EH
    g_strErrorLocation = "frmShip:SetCAScreen"
    
    Dim strProvTemp As String
    Dim strSave As String
    
    'Load both LBS and KGS in weight type
    ' 2005-08-18, JFW, save current weight type
    If f75 & "" <> "" Then g_clsReg.SetRegistryValue "WeightType", f75 & "", REG_SZ
    f75.Clear
    f75.AddItem "KGS"
    f75.AddItem "LBS"
    f75 = g_clsReg.GetRegistryValue("WeightType", "")
    
    lbl1355.Visible = False
    f1355.Visible = False
    chkIPD(0) = 0
    chkIPD(1) = 0
    
    If Left(f50, 2) = "CA" Then
        'Disable Intl tab
        SSTab1.TabEnabled(1) = False
        
        'Change captions for wgt and DV
        lblWeight.Caption = "Package Weight:"
        lblDecVal.Caption = "Declared Value:"
        lblDecVal.FontBold = False
        
        'Change label to state and make bold
        lblState = "Prov:"
        lblState.FontBold = True
        
        'Hide Intl Doc and Commodities option buttons
        optDocument.Visible = False
        optCommodities.Visible = False
        
        'Make Identical pkgs checkbox visible
        chkDuplicate.Enabled = True
    Else
        'Enable Intl Tab
        SSTab1.TabEnabled(1) = True
        'Change Weight and Declared Value Labels
        lblWeight.Caption = "Shipment Weight:"
        lblDecVal.Caption = "Carriage Value:"
        lblDecVal.FontBold = True
        'Copy Destination Country to Ultimate Destination Country
        f74 = f50
        
        'Make the Intl radio buttons visible
        optDocument.Visible = True
        optCommodities.Visible = True
        optCommodities.Value = True
        
        'If Non US destination save f16, clear, then restore the value
        If Left(f50, 2) <> "US" Then
            strProvTemp = f16
            f16.Clear
            f16 = strProvTemp
        End If
        
        'Change state label and turn off bold
        lblState = "State/Prov:"
        lblState.FontBold = False
        
        'Make Identical pkgs checkbox grayed
        chkDuplicate.Enabled = False
    End If
    
    ' 2005-08-18, JFW, don't reset
    ' f75.ListIndex = 0
    f75 = g_clsReg.GetRegistryValue("WeightType", "")
    If f75 & "" = "" Then f75.ListIndex = 0
    
    'Add Intl Currency Types to Declared Value
    strSave = f68                       '2005-03-29, JFW
    f68.Clear
    Call LoadCurrencies(f68)
    ' f68.ListIndex = 6                 '2005-03-29, JFW
    f68 = strSave                       '2005-03-29, JFW
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : f51_Click()
' DateTime  : 3/16/2004
' Purpose   : If Signature Release is selected highlight release number box ands set focus
'---------------------------------------------------------------------------------------
'
Private Sub f51_Click(Index As Integer)
    On Error Resume Next
    If f51(Index) = 1 Then
        f1208 = 0 'Clear Signature Required
        If frmSetup.f1118 = "" Then
            f1118(Index).BackColor = &HC0E0FF
            f1118(Index).SetFocus
        Else
            f1118(Index) = frmSetup.f1118
        End If
    Else
        f1118(Index) = ""
        f1118(Index).BackColor = &HFFFFFF
    End If
End Sub
'---------------------------------------------------------------------------------------
' Procedure : f532_Change(), f532_Change(), f532_Change()
'             f532_LostFocus(), f532_LostFocus(), f532_LostFocus()
' DateTime  : 3/16/2004
' Purpose   : CI charges fields are numeric.
'---------------------------------------------------------------------------------------
'
Private Sub f532_Change()
    On Error GoTo EH
    g_strErrorLocation = "frmShip:f532_Change"
    
    Call NumericOnly(f532)
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
Private Sub f533_Change()
    On Error GoTo EH
    g_strErrorLocation = "frmShip:f533_Change"
    
    Call NumericOnly(f533)
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
Private Sub f534_Change()
    On Error GoTo EH
    g_strErrorLocation = "frmShip:f534_Change"
    
    Call NumericOnly(f534)
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : f57_Change(), f58_Change(), f59_Change()
' DateTime  : 3/16/2004
' Purpose   : Dimensions fields are numeric with a max length of 3.
'---------------------------------------------------------------------------------------
'
Private Sub f57_Change(Index As Integer)
    On Error GoTo EH
    g_strErrorLocation = "frmShip:f57_Change"
    
    Call NumericOnly(f57(Index), False)
    Call CheckLength(f57(Index), 3)
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub

Private Sub f58_Change(Index As Integer)
    On Error GoTo EH
    g_strErrorLocation = "frmShip:f58_Change"
    
    Call NumericOnly(f58(Index), False)
    Call CheckLength(f58(Index), 3)
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub

Private Sub f59_Change(Index As Integer)
    On Error GoTo EH
    g_strErrorLocation = "frmShip:f59_Change"
    
    Call NumericOnly(f59(Index), False)
    Call CheckLength(f59(Index), 3)
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub



'---------------------------------------------------------------------------------------
' Procedure : f70_Click()
' DateTime  : 3/16/2004
' Purpose   : If Bill 3rd party selected for Duty/Taxes payor highlight Duty/taxes acct#
'             field and set focus to it.
'---------------------------------------------------------------------------------------
'
Private Sub f70_Click()
    On Error GoTo EH
    g_strErrorLocation = "frmShip:f70_Click"
    
    Select Case Left(f70, 1)
        Case "2"
            f71.Enabled = True
            f71.BackColor = &HFFFFFF
        Case "3"
            f71.Enabled = True
            f71.BackColor = &HC0E0FF
            f71.SetFocus
        Case Else
            f71.Enabled = False
            f71 = ""
    End Select
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : f70_Change()
' DateTime  : 2/18/2005
' Purpose   : Calls a routine to populate the entire text of selected payment type.
'---------------------------------------------------------------------------------------
'
Private Sub f70_Change()
    If Len(f70) >= 1 Then
        Call SetComboSelection(f70, f70)
    End If
End Sub
'---------------------------------------------------------------------------------------
' Procedure : f71_Change()
' DateTime  : 3/16/2004
' Purpose   : Duty taxes acct# is numeric with max length of 9.
'---------------------------------------------------------------------------------------
'
Private Sub f71_Change()
    On Error GoTo EH
    g_strErrorLocation = "frmShip:f71_Change"
    
    f71.BackColor = &HFFFFFF
    Call NumericOnly(f71, False)
    Call CheckLength(f71, 9)
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : f71_LostFocus()
' DateTime  : 3/16/2004
' Purpose   : Duty/Taxes acct# - validate
'---------------------------------------------------------------------------------------
'
Private Sub f71_LostFocus()
    On Error GoTo EH
    g_strErrorLocation = "frmShip:f71_LostFocus"
    
    If Not AcctNumCheckOK(f71) Then
        If f71 = "" And Left(f70, 1) = "3" Then
            f71.BackColor = &HC0E0FF
        ElseIf f71 = "" And Left(f70, 1) = "2" Then
            f71.BackColor = &HFFFFFF
        Else
            MsgBox "Invalid FedEx Account Number", vbExclamation, "Account Number Error"
            f71.BackColor = &HC0E0FF
            f71.SetFocus
        End If
    End If
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : f72_Click()
' DateTime  : 10/29/2004
' Purpose   : Sets the current selection after the first number is entered
'---------------------------------------------------------------------------------------
'
Private Sub f72_Change()
    If Len(f72) >= 1 Then
        Call SetComboSelection(f72, f72)
    End If
End Sub
'---------------------------------------------------------------------------------------
' Procedure : f72_Click()
' DateTime  : 3/16/2004
' Purpose   : Set the CI field allowed and required for different Terms of Sale values.
'---------------------------------------------------------------------------------------
'
Private Sub f72_Click()
    On Error GoTo EH
    g_strErrorLocation = "frmShip:f72_Click"
    
    Select Case Left(f72, 1)
        Case 2, 5, 6
            f532.Enabled = True
            f533.Enabled = True
            lblCI(1).Enabled = True
            ' lblCI(2).Enabled = True
            lblCI(1).FontBold = True
            ' lblCI(2).FontBold = True
        Case 3
            f532.Enabled = True
            f533.Enabled = False
            lblCI(1).Enabled = True
            ' lblCI(2).Enabled = False
            lblCI(1).FontBold = True
            ' lblCI(2).FontBold = False
        Case Else
            f532.Enabled = False
            f533.Enabled = False
            lblCI(1).Enabled = False
            ' lblCI(2).Enabled = False
            lblCI(1).FontBold = False
            ' lblCI(2).FontBold = False
    End Select
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : f74_Change()
' DateTime  : 1/27/2005
' Purpose   : After Country is at least 2 characters call routines to set populate
'             the selection text.
'---------------------------------------------------------------------------------------
'
Private Sub f74_Change()
    
    If Len(f74) >= 2 Then
        Call SetComboSelection(f74, f74)
    End If

End Sub

'---------------------------------------------------------------------------------------
' Procedure : f77_Change()
' DateTime  : 3/16/2004
' Purpose   : Weight is numeric, KGS allows decimal, LBS does not
'---------------------------------------------------------------------------------------
'
Private Sub f77_Change()
    On Error GoTo EH
    g_strErrorLocation = "frmShip:f77_Change"
    
    Call NumericOnly(f77, True)
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub


'---------------------------------------------------------------------------------------
' Procedure : f80_Change()
' DateTime  : 1/27/2005
' Purpose   : After Country is at least 2 characters call routines to set populate
'             the selection text.
'---------------------------------------------------------------------------------------
'
Private Sub f80_Change(Index As Integer)
    
    If Len(f80(Index)) >= 2 Then
        Call SetComboSelection(f80(Index), f80(Index))
    End If

End Sub

'---------------------------------------------------------------------------------------
' Procedure : f82_Change()
' DateTime  : 3/16/2004
' Purpose   : Number of units is numeric only
'---------------------------------------------------------------------------------------
'
Private Sub f82_Change()
    On Error GoTo EH
    g_strErrorLocation = "frmShip:f82_Change"
    
    Call NumericOnly(f82, False)
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : f82_LostFocus()
' DateTime  : 3/16/2004
' Purpose   : After Number of Units field loses focus calculate Customs Value and Weight
'---------------------------------------------------------------------------------------
'
Private Sub f82_LostFocus()
    On Error GoTo EH
    g_strErrorLocation = "frmShip:f82_LostFocus"
    
    Call CalcCustomsValue
    Call CalcTotalWgt
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : Form_Initialize()
' DateTime  : 7/22/2004
' Purpose   : Use this sub to enable/disable optimization. Set g_blnAllowOptimize to True.
'             This makes the txtDelDate field and Calendar4 visible to allow Optimization.
'---------------------------------------------------------------------------------------
'
Private Sub Form_Initialize()
    g_blnAllowOptimize = False
End Sub
'---------------------------------------------------------------------------------------
' Procedure : Form_KeyUp()
' DateTime  : 4/8/2004
' Purpose   : If F keys are pressed, run corresponding routines.
'             Note: The Track buttons F8 & F9 are called from the grdShipments_KeyUp
'             subroutine since they are only enabled when a record is selected in the
'             grid.
'---------------------------------------------------------------------------------------
'
Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
    On Error GoTo EH
    g_strErrorLocation = "frmShip:Form_KeyUp"
    
    Dim i As Integer
    
    'Only execute when Shift, Ctrl, and Alt aren't pressed
    If Shift = 0 Then
        Select Case KeyCode
            Case 112    'F1 Help
            Case 113    'F2 Custom1 button
                If cmdCustom(1).Visible = True Then Call CustomButton1
            Case 114    'F3 Custom2 button
                If cmdCustom(2).Visible = True Then Call CustomButton2
            Case 115    'F4 Custom3 button
                If cmdCustom(3).Visible = True Then Call CustomButton3
            Case 116    'F5 Clear
                If cmdMenu(0).Enabled = True Then Call ClearButton
            Case 117    'F6 Delete
                If cmdMenu(1).Enabled = True Then Call DeleteButton
            Case 118    'F7 Close
                If cmdMenu(2).Enabled = True Then Call CloseButton
            Case 122    'F11 Rate
                If cmdMenu(5).Enabled = True Then Call RateButton
            Case 123    'F12 Ship
                If cmdMenu(6).Enabled = True Then Call ShipButton
        End Select
    ElseIf Shift = 2 Then
        Select Case KeyCode
            'CTRL-A Toggles Address Book and interactive processing
            Case 65
                App.LogEvent "Ship.KeyUp, Ctrl-A"
                Call ToggleLookup
            'CTRL-D Toggles f38 Text box and cboDept Combo
            Case 68
                Call ToggleDepartment
            'CTRL-I Shows IPD Shipments form when IPD is enabled for an account
            Case 73
                If frmSetup.chkIPD = 1 Then
                    frmIPD.Show vbModeless, Me
                End If
            'CTRL-R Shows Setup form with only Alt Return Addr tab enabled to allow
            'user to change current addr.
            Case 82
                With frmSetup
                    If .chkLevel2Access(10) = 1 Then
                        For i = 0 To .SSTab1.Tabs - 1
                            If i = 10 Then
                                .SSTab1.TabEnabled(i) = True
                            Else
                                .SSTab1.TabEnabled(i) = False
                            End If
                        Next
                        .Show vbModeless, Me
                        .SSTab1.Tab = 10
                        .cboAddrID.SetFocus
                    End If
                End With
        End Select
    End If
    Me.Refresh
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : Form_KeyDown()
' DateTime  : 2/17/2005
' Purpose   : Enter key pressed sends a TAB to move to next field
'---------------------------------------------------------------------------------------
'
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
    If Not TypeOf Me.ActiveControl Is CommandButton Then
        If Shift = 0 And KeyCode = 13 Then
            SendKeys "{TAB}"
        End If
    End If
End Sub
'---------------------------------------------------------------------------------------
' Module    : Form_Load()
' DateTime  : 3/16/2004
' Author    : Chris Elwell
' Purpose   : Set intial program settings.
'---------------------------------------------------------------------------------------
'
Private Sub Form_Load()
    
    Dim i As Integer
    
    On Error GoTo EH
    g_strErrorLocation = "frmShip:Form_Load"
    
    Set g_clsReg = New clsRegistryRoutines
    Set g_clsParser = New clsFXRSParser
    Set g_connFSMSClient = New ADODB.Connection
    
    'Initialize booleans
    g_blnFormLoadComplete = False
    g_blnDeletesComplete = True
    
    If Screen.Width = 12000 Then
        Me.Width = Screen.Width
        Me.Height = Screen.Height
        Call ResizeAll(Me)
    End If
    
    'Attempt to open connection, if unable try to make the required DSN, retry connection,
    'if neither attempt is successful show error and exit.
    If Not FSMSClientMDBConnect Then
        If AddDSN Then
            Call Pause(1)
            If Not FSMSClientMDBConnect Then
                MsgBox "Unable to connect to the FSMS Client Database. Shutting Down.", vbCritical, "Database Connection Error"
                Unload Me
            End If
        Else
            MsgBox "Unable to connect to the FSMS Client Database. Shutting Down.", vbCritical, "Database Connection Error"
            Unload Me
        End If
    End If
    
    'Custom routine that runs once declared in integration module
    Call Initialize
    
    'Load currencies into f1090
    Call LoadCurrencies(f1090)
    f1090.ListIndex = 1
    
    'Populate cboBoxName combos on frmShip and frmMPS - Added one on Service Quote tab
    Call LoadBoxDIMsCombos(cboBoxName(0))
    Call LoadBoxDIMsCombos(cboBoxName(1))
    Call LoadBoxDIMsCombos(frmMPS.cboBoxName)
    
    'Initialize Destination Countries combo
    Call LoadCountries(f50)
    'Initialize Country of Manufacture combos
    Call LoadCountries(f80(0))
    Call LoadCountries(f80(1))
    'Initialize Ulimate Destination Countries combo
    Call LoadCountries(f74)
    
    'Show Express logo, hide Ground logo
    imgLogo1.Visible = True
    imgLogo2.Visible = False
    
    'Set g_blnOptimize to True in Form_Initialize if you want to allow service optimization
    If g_blnAllowOptimize Then
        txtDelDate.Visible = True
        Image1.Visible = True
        lblShipDate.Caption = "Ship Date/Del Date:"
        lblShipDate.FontBold = True
    Else
        txtDelDate.Visible = False
        Image1.Visible = False
        lblShipDate.Caption = "Ship Date:"
        lblShipDate.FontBold = False
    End If
    
    'Default #pkgs to 1
    f116 = "1"

    'Ship date defaults to today
    f24.Text = Date
    Calendar1.Today
    Calendar4.Today
    txtShipDate = Date
    
    'Set calendar sizes
    Calendar1.Height = 2295 'Ship date - Ship Tab
    Calendar1.Width = 3015
    Calendar2.Height = 2475 'Export License expiration date - Intl Tab
    Calendar2.Width = 3195
    Calendar3.Height = 2295 'Ship Date - Shipping History Tab
    Calendar3.Width = 3015
    Calendar4.Height = 2295 'Deliver Date - Ship Tab
    Calendar4.Width = 3015
    
    'Select Express and Shipped as default types for Shipments tab
    'optType(0).Value = True
    'optStatus(0).Value = True
    
    'Disable Email button until service selected
    If f1274 = "" Then
        chkEmailAlert.Enabled = False
    End If
    'Disable MPS, Intl MPS Dims, and Add to Shipment (Intl tab) buttons until OrderID is entered
    cmdMPS.Enabled = False
    cmdAddToShipment.Enabled = False
    
    'Disable buttons that require FXRS connection
    Call DisableButtons
    
    'Disable Track buttons
    Call SetTrackButtons
    
    'Disable Abort Batch button until processing begins
    cmdAbortBatch.Enabled = False
    
    ' 2005-08-18, JFW, Recognize CA on load.
    DoEvents
    
    If Left(f50 & "", 2) & "" = "CA" Then
        'Load Recipient State combo
        Call LoadProvinces(f16)
        'Load DestState combo on Service Quote tab
        Call LoadProvinces(cboDestState)
    ElseIf Left(g_clsReg.GetRegistryValue("RecipientCountry", "CA"), 2) = "CA" Then
        'Load Recipient State combo
        Call LoadProvinces(f16)
        'Load DestState combo on Service Quote tab
        Call LoadProvinces(cboDestState)
    Else
        'Load Recipient State combo
        Call LoadStates(f16)
        'Load DestState combo on Service Quote tab
        Call LoadStates(cboDestState)
    End If
    
    DoEvents
    
    'Set intial services and packaging - disable fields until weight is entered
    Call LoadServices
    Call LoadPackaging
    
    'Set Billing to Bill Recipient
    f23.ListIndex = 0
    
    'Connect to FXRS if Connect on Startup box checked in Setup
    If frmSetup.chkConnectOnStartup = 1 Then
        Call ConnectFXRS
    End If
    'Initialize package count
    g_intDupCount = 1
    
    'Populate Unit of Measure combo
    f414.AddItem "BBL - Barrel"
    f414.AddItem "BU - Bushel"
    f414.AddItem "C - Celsius"
    f414.AddItem "CAR - Carat"
    f414.AddItem "CFT - Cubic Feet"
    f414.AddItem "CG - Centigrams"
    f414.AddItem "CM - Centimeter"
    f414.AddItem "CM3 - Cubic Centimeters"
    f414.AddItem "DOZ - Dozen"
    f414.AddItem "DPR - Dozen Pair"
    f414.AddItem "E - Each"
    f414.AddItem "GAL - Gallon"
    f414.AddItem "GR - Gross"
    f414.AddItem "GRM - Gram"
    f414.AddItem "KG - Kilogram"
    f414.AddItem "L - Liter"
    f414.AddItem "LB - Pound"
    f414.AddItem "LFT - Linear Foot"
    f414.AddItem "LNM - Linear Meter"
    f414.AddItem "LTR - Liters"
    f414.AddItem "LYD - Linear Yard"
    f414.AddItem "M - Meter"
    f414.AddItem "M2 - Square Meters"
    f414.AddItem "M3 - Cubic Meters"
    f414.AddItem "MG - Milligrams"
    f414.AddItem "ML - Milliliters"
    f414.AddItem "NO - Number"
    f414.AddItem "OZ - Ounces"
    f414.AddItem "PCS - Pieces"
    f414.AddItem "PR - Pair"
    f414.AddItem "PRS - Pair of Pairs"
    f414.AddItem "SFT - Square Foot"
    f414.AddItem "SQI - Square Inch"
    f414.AddItem "SYD - Square Yard"
    f414.AddItem "YD - Yard"
    
    'Populate DocType combo
    f79Doc.AddItem "Birth Certificates"
    f79Doc.AddItem "Employment Papers"
    f79Doc.AddItem "Immigration Papers"
    f79Doc.AddItem "Income Statements"
    f79Doc.AddItem "Letters and Cards"
    f79Doc.AddItem "Marriage Certificates"
    f79Doc.AddItem "Marriage Licenses"
    f79Doc.AddItem "Medical Records"
    f79Doc.AddItem "Tax Papers"
    f79Doc.AddItem "Accounting Documents"
    f79Doc.AddItem "Analysis Reports"
    f79Doc.AddItem "Application for License"
    f79Doc.AddItem "Applications for Loans"
    f79Doc.AddItem "Bank Statements"
    f79Doc.AddItem "Bid Quotations"
    f79Doc.AddItem "Bills of Sale"
    f79Doc.AddItem "Bonds"
    f79Doc.AddItem "Budget Statements/Report"
    f79Doc.AddItem "Business Correspondence"
    f79Doc.AddItem "Checks"
    f79Doc.AddItem "Claim Files"
    f79Doc.AddItem "Closing Statements"
    f79Doc.AddItem "Conference Reports"
    f79Doc.AddItem "Contracts"
    f79Doc.AddItem "Cost Estimates"
    f79Doc.AddItem "Court Transcripts"
    f79Doc.AddItem "Credit Applications"
    f79Doc.AddItem "Customs Documents"
    f79Doc.AddItem "Data Sheets"
    f79Doc.AddItem "Escrow Instructions"
    f79Doc.AddItem "Export Papers"
    f79Doc.AddItem "Financial Statements"
    f79Doc.AddItem "Franchise Reports"
    f79Doc.AddItem "Hotel Reservations"
    f79Doc.AddItem "Insurance Documents"
    f79Doc.AddItem "Inter-office Memos"
    f79Doc.AddItem "Inventory Reports"
    f79Doc.AddItem "Invoices"
    f79Doc.AddItem "Leases"
    f79Doc.AddItem "Legal Documents"
    f79Doc.AddItem "Letter of Credit Doc."
    f79Doc.AddItem "Loan Documents"
    f79Doc.AddItem "Memorandums"
    f79Doc.AddItem "Office Records"
    f79Doc.AddItem "Operating Agreements"
    f79Doc.AddItem "Patent Applications"
    f79Doc.AddItem "Permits"
    f79Doc.AddItem "Photocopies (PIB docs)"
    f79Doc.AddItem "Price Lists"
    f79Doc.AddItem "Proposals"
    f79Doc.AddItem "Prospectus"
    f79Doc.AddItem "Purchase Orders"
    f79Doc.AddItem "Quotations"
    f79Doc.AddItem "Resumes"
    f79Doc.AddItem "Sales Agreements"
    f79Doc.AddItem "Sales Reports"
    f79Doc.AddItem "Shipping Documents"
    f79Doc.AddItem "Statistical Data"
    f79Doc.AddItem "Stock Information"
    f79Doc.AddItem "Trade Confirmations"
    f79Doc.AddItem "Transcripts"
    f79Doc.AddItem "Warranty Deeds"
    f79Doc.AddItem "Travel Agendas/Itinerary"
    f79Doc.AddItem "Travel Proposals"
    
    'If Use Commodity db is checked on setup, load the CommodityID combo on the Intl
    'tab and enable the Commodities menu item under File|Import.
    If frmSetup.chkUseCommodityDB = 1 Then
        Call LoadCommodities
        mnuCommodities.Enabled = True
    Else
        mnuCommodities.Enabled = False
        cboCommodityID.Enabled = False
    End If
    
    'Set Custom button properties
    Call frmSetup.SetCustomButtons
    
    'Select first Visible tab as default
    For i = 0 To 5
        If SSTab1.TabVisible(i) = True Then
            SSTab1.Tab = i
            Exit For
        End If
    Next
    
    'Select Express as default view in Shipping History
    If SSTab1.TabVisible(4) Then optType(0) = True
    
    Exit Sub
EH:
     
    MsgBox Err.Description, vbCritical, g_strErrorLocation
    
End Sub
'---------------------------------------------------------------------------------------
' Module    : Form_Unload
' DateTime  : 3/16/2004
' Author    : Chris Elwell
' Purpose   : Kill global objects, unload forms and end program
'---------------------------------------------------------------------------------------
'
Private Sub Form_Unload(Cancel As Integer)
    
    Dim frm As Form
    
    On Error Resume Next
    
    'Kill objects
    If g_rsCommodities.State = adStateOpen Then g_rsCommodities.Close
    Set g_rsCommodities = Nothing
    Set g_clsReg = Nothing
    Set g_clsParser = Nothing
    Set g_connFSMSClient = Nothing
    Set g_connFXRS = Nothing
    
    'Unload forms
    For Each frm In Forms
        Unload frm
    Next
    
    End

End Sub
'---------------------------------------------------------------------------------------
' Procedure : fraRate_MouseMove()
' DateTime  : 7/16/2004
' Purpose   : When mouse is on fraRate on Service Quote, the Rate Details are cleared.
'---------------------------------------------------------------------------------------
'
Private Sub fraRate_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
    On Error GoTo EH
    g_strErrorLocation = "frmShip:fraRate_MouseMove"
    
    Call ClearRateDetails
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub

'---------------------------------------------------------------------------------------
' Procedure : grdCommodities_AfterDelete()
' DateTime  : 3/16/2004
' Purpose   : Update commodity datagrid after a record is deleted.
'---------------------------------------------------------------------------------------
'
Private Sub grdCommodities_AfterDelete()
    Dim rsCommoditiesQuery As String
    Dim strID As String
    
    On Error GoTo EH
    g_strErrorLocation = "frmShip:grdCommodities_AfterDelete"

    'Added 3/10/05 to support Address Book
    If f1.Visible Then
        strID = f1
    Else
        strID = cboCustID
    End If
    
    Set g_rsCommodities = New ADODB.Recordset
    rsCommoditiesQuery = "SELECT * FROM IntlCommodities WHERE f1 = '" & strID & "'"
    g_rsCommodities.Open rsCommoditiesQuery, g_connFSMSClient, adOpenKeyset, adLockOptimistic
    grdCommodities.Caption = "Total Commodities: " & Str(g_rsCommodities.RecordCount - 1)
    If g_rsCommodities.State = adStateOpen Then
        g_rsCommodities.Close
    End If
    Set g_rsCommodities = Nothing

     Exit Sub
EH:
     MsgBox Err.Description, vbCritical, g_strErrorLocation
End Sub
'---------------------------------------------------------------------------------------
' Procedure : grdCommodities_AfterColUpdate()
' DateTime  : 7/15/2004
' Modified  : 8/11/2004
' Change    : Added a check for Null before setting the bookmark. This allows records
'             to be added. Also added error handling.
' Purpose   : This commits the changes immediately after a column has been updated.
'             This keeps users from getting "Operation not allowed in this context" error.
'---------------------------------------------------------------------------------------
'
Private Sub grdCommodities_AfterColUpdate(ByVal ColIndex As Integer)
    On Error GoTo EH
    g_strErrorLocation = "frmShip:grdCommodities_AfterColUpdate"
    
    If grdCommodities.Bookmark >= 0 Then
        grdCommodities.Bookmark = grdCommodities.Bookmark
    End If
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : grdShipments_Click()
' DateTime  : 5/24/2004
' Purpose   : Call SetTrackButton to enable/disable tracking buttons.
'---------------------------------------------------------------------------------------
'
Private Sub grdShipments_Click()
    On Error GoTo EH
    g_strErrorLocation = "frmShip:grdShipments_Click"
    
    Call SetTrackButtons
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : grdShipments_DblClick()
' DateTime  : 3/16/2004
' Purpose   : Verifies you're connected to FXRS before trying to delete from Shipments grid.
'---------------------------------------------------------------------------------------
'
Private Sub grdShipments_DblClick()
    Dim intAnswer As Integer
    
    On Error GoTo EH
    g_strErrorLocation = "frmShip:grdShipments_DblClick"
    
    If wscFXRS.State <> 7 Then
        MsgBox "You must be connected to the FSMS to delete a package.", vbExclamation, "Delete Error"
    Else
        'Verify
        intAnswer = MsgBox("Are you sure you want to delete tracking # " & grdShipments.Columns(0) & "?", vbYesNo, "Confirm Delete")
        
        If intAnswer = vbYes Then
            If optType(3) Then
                Call SendData(BuildCRNDeleteTrans(grdShipments.Columns(0), grdShipments.Columns(2), grdShipments.Columns(11)))
            Else
                Call SendData(BuildDeleteTrans(grdShipments.Columns(0)))
            End If
        End If
    End If
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub

Private Sub grdShipments_KeyPress(KeyAscii As Integer)
    On Error GoTo EH
    g_strErrorLocation = "frmShip:grdShipments_KeyUp"
    
    Select Case KeyAscii
        Case 117    'F6 Delete
            If cmdMenu(1).Enabled = True Then Call DeleteButton
        Case 119
            If cmdMenu(3).Enabled = True Then Call TrackIt(grdShipments.Columns(0))
        Case 120
            If cmdMenu(4).Enabled = True Then Call RefTrackButton
    End Select
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub

'---------------------------------------------------------------------------------------
' Procedure : grdShipments_KeyUp()
' DateTime  : 3/16/2004
' Purpose   : Call trk by trk# or trk by reference when F8 or F9 pressed
'---------------------------------------------------------------------------------------
'
Private Sub grdShipments_KeyDown(KeyCode As Integer, Shift As Integer)
    On Error GoTo EH
    g_strErrorLocation = "frmShip:grdShipments_KeyUp"

    Select Case KeyCode
        Case 117    'F6 Delete
            If cmdMenu(1).Enabled = True Then Call DeleteButton
        Case 119
            If cmdMenu(3).Enabled = True Then Call TrackIt(grdShipments.Columns(0))
        Case 120
            If cmdMenu(4).Enabled = True Then Call RefTrackButton
    End Select

    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : grdShipments_HeadClick()
' DateTime  : 6/8/2004
' Purpose   : Sort by column when heading clicked
'---------------------------------------------------------------------------------------
'
Private Sub grdShipments_HeadClick(ByVal ColIndex As Integer)

    On Error GoTo EH
    g_strErrorLocation = "frmShip:grdShipments_HeadClick"

    If m_intLastColumnSort = ColIndex Then
        m_blnSortOrder = Not m_blnSortOrder
    Else
        m_blnSortOrder = True
    End If
    'If a search has been performed sort only searched records
    If txtSearchValue <> "" Then
        Call UpdateShipmentsGrid(cboSearchField, txtSearchValue, grdShipments.Columns(ColIndex).Caption, IIf(m_blnSortOrder, "ASC", "DESC"))
    Else
        Call UpdateShipmentsGrid(, , grdShipments.Columns(ColIndex).Caption, IIf(m_blnSortOrder, "ASC", "DESC"))
    End If
    
    m_intLastColumnSort = ColIndex
    
    Exit Sub

EH:
     MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : Image1_Click()
' DateTime  : 7/22/2004
' Purpose   : Show calendar for Del Date (Optimization only).
'---------------------------------------------------------------------------------------
'
Private Sub Image1_Click()
    Calendar4.Visible = True
End Sub

'---------------------------------------------------------------------------------------
' Procedure : Image3_Click()
' DateTime  : 3/16/2004
' Purpose   : Show calendar for Export License Expiration Date.
'---------------------------------------------------------------------------------------
'
Private Sub Image3_Click()
    Calendar2.Visible = True
End Sub
'---------------------------------------------------------------------------------------
' Procedure : Image4_Click()
' DateTime  : 3/22/2004
' Purpose   : Show calendar for ShipDate on Shipped List tab.
'---------------------------------------------------------------------------------------
'
Private Sub Image4_Click()
    Calendar3.Visible = True
End Sub
'---------------------------------------------------------------------------------------
' Procedure : lstErrorTransactions_DblClick()
' DateTime  : 3/22/2004
' Updated   : 8/18/2004
' Modified  : Added If statement to only do batch edit if Ship form is enabled.
' Purpose   : Calls BatchErrorEdit which displayed the error batch transaction on the Ship
'             for editing. Then remove the item from the error list.
'---------------------------------------------------------------------------------------
'
Private Sub lstErrorTransactions_DblClick()
    On Error GoTo EH
    g_strErrorLocation = "frmShip:lstErrorTransactions_DblClick"
    
    With lstErrorTransactions
        If SSTab1.TabVisible(0) = True Then
            f1 = ""
            g_blnBatchEdit = True
            Call BatchErrorEdit(.Text)
            .RemoveItem (.ListIndex)
            .ToolTipText = "Double-click a line to process on Ship screen."
            
            SSTab1.Tab = 0
        Else
            .ToolTipText = ""
        End If
    End With
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub

Private Sub mnuAddressBook_Click()
    frmImport.Show vbModeless, Me
    frmImport.Caption = "Import Addresses"
End Sub

Private Sub mnuAddressBookEdit_Click()
    frmAddressEdit.Show vbModeless, Me
End Sub

Private Sub mnuAltReturnAddr_Click()
    frmImport.Show vbModeless, Me
    frmImport.Caption = "Import Alternate Return Addresses"
End Sub

Private Sub mnuAltReturnAddrEdit_Click()
    frmAltReturnAddrEdit.Show vbModeless, Me
End Sub

'---------------------------------------------------------------------------------------
' Procedure : mnuCommodities_Click()
' DateTime  : 3/25/2004
' Purpose   : Shows the Commodity Import form.
'---------------------------------------------------------------------------------------
'
Private Sub mnuCommodities_Click()
    frmImport.Show vbModeless, Me
    frmImport.Caption = "Import Commodities"
End Sub
'---------------------------------------------------------------------------------------
' Procedure : mnuCommoditiesEdit_Click()
' DateTime  : 3/25/2004
' Purpose   : Shows the Commodity Add/Edit/Delete form.
'---------------------------------------------------------------------------------------
'
Private Sub mnuCommoditiesEdit_Click()
    frmCommoditiesEdit.Show vbModeless, Me
End Sub

'---------------------------------------------------------------------------------------
' Procedure : mnuConnect_Click()
' DateTime  : 5/11/2004
' Purpose   : Calls routine to connect FXRS then sets focus to f1.
'---------------------------------------------------------------------------------------
'
Private Sub mnuConnect_Click()
    On Error GoTo EH
    g_strErrorLocation = "frmShip:mnuConnect_Click"
    
    Call ConnectFXRS
    'Added 8/31 to support Address Book
    If f1.Visible Then
        f1.SetFocus
    Else
        cboCustID.SetFocus
    End If
    
    Exit Sub
EH:
     MsgBox Err.Description, vbCritical, g_strErrorLocation
End Sub
'---------------------------------------------------------------------------------------
' Procedure : ConnectFXRS()
' DateTime  : 6/7/2004
' Purpose   : Connects to or disconnects from FXRS depending on the caption of the menu item.
'---------------------------------------------------------------------------------------
'
Public Sub ConnectFXRS()
    On Error GoTo EH
    g_strErrorLocation = "frmShip:ConnectFXRS"
    
    With frmSetup
        If mnuConnect.Caption = "&Connect" Then
            If wscFXRS.State <> 7 And .cboFXRSIP <> "" Then
                wscFXRS.Connect .cboFXRSIP, Val(.txtFXRSPort)
            End If
            mnuConnect.Enabled = False
        Else
            If wscFXRS.State = 7 Then
                wscFXRS.Close
            End If
            mnuConnect.Caption = "&Connect"
        End If
    End With
    
    Exit Sub
EH:
     MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : mnuDepartments_Click()
' DateTime  : 2/10/2005
' Purpose   : Import Departments selected from menu, show import DIMs form
'---------------------------------------------------------------------------------------
'
Private Sub mnuDepartments_Click()
    frmImport.Show vbModeless, Me
    frmImport.Caption = "Import Departments"
End Sub
'---------------------------------------------------------------------------------------
' Procedure : mnuDeptEdit_Click()
' DateTime  : 2/10/2005
' Purpose   : Shows the Dept Add/Edit/Delete form.
'---------------------------------------------------------------------------------------
'
Private Sub mnuDeptEdit_Click()
    frmDeptsEdit.Show vbModeless, Me
End Sub
'---------------------------------------------------------------------------------------
' Procedure : mnuDIMsEdit_Click()
' DateTime  : 2/10/2005
' Purpose   : Shows the DIMs Add/Edit/Delete form.
'---------------------------------------------------------------------------------------
'
Private Sub mnuDIMsEdit_Click()
    frmDIMsEdit.Show vbModeless, Me
End Sub
'---------------------------------------------------------------------------------------
' Procedure : mnuDIMs_Click()
' DateTime  : 4/9/2004
' Purpose   : Import Box DIMs selected from menu, show import DIMs form
'---------------------------------------------------------------------------------------
'
Private Sub mnuDIMs_Click()
    frmImport.Show vbModeless, Me
    frmImport.Caption = "Import Box Dimensions"
End Sub
'---------------------------------------------------------------------------------------
' Procedure : mnuPreAssign_Click()
' DateTime  : 3/2/2005
' Purpose   : preAssign selected from menu, show Pre-Assign form
'---------------------------------------------------------------------------------------
'
Private Sub mnuPreAssign_Click()
    
    frmPreAssign.Show vbModeless, Me

End Sub

'---------------------------------------------------------------------------------------
' Procedure : mnuPurge_Click()
' DateTime  : 4/9/2004
' Purpose   : Purge selected from Menu, show Purge form
'---------------------------------------------------------------------------------------
'
Private Sub mnuPurge_Click()
    frmPurge.Show vbModeless, Me
End Sub

'---------------------------------------------------------------------------------------
' Procedure : optCommodities_Click()
' DateTime  : 3/16/2004
' Purpose   : Setup shipping screens for Intl commodity shipping.
'---------------------------------------------------------------------------------------
'
Private Sub optCommodities_Click()
    Dim i As Integer

    On Error GoTo EH
    g_strErrorLocation = "frmShip:optCommodities_Click"
    
    If optCommodities Then
        chkDuplicate.Enabled = False
        lblDecVal.Caption = "Total Carriage Value:"
        lblDecVal.FontBold = False
        fraCommod.Visible = True
        fraDocs.Visible = False
        fraCommodity.Enabled = True
        fraCI.Enabled = True
        fraSEDShipper.Enabled = True
        If frmSetup.chkIntlTab(3) = 0 Then f413.Enabled = True
        For i = 0 To lblCommodity.UBound
            lblCommodity(i).Enabled = True
        Next
        chkB13A.Enabled = True
        
        'Added 3/17/05 - changed the label names for CI section
        On Error Resume Next
        For i = 0 To lblCI.UBound
            lblCI(i).Enabled = True
        Next
        On Error GoTo EH
        
        'Added 3/17/05 - changed the label name for ITN/FTSR field
        lbl1358.Enabled = True
        'Updated 3/10/05 to support Address Book
        If f1 <> "" Or cboCustID <> "" Then
            cmdAddToShipment.Enabled = True
            If frmSetup.chkShipTab(25) = 0 Then cmdMPS.Enabled = True
        End If
        grdCommodities.Enabled = True
    End If
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : optDocument_Click()
' DateTime  : 3/16/2004
' Purpose   : Setup shipping screens for Intl document shipping.
'---------------------------------------------------------------------------------------
'
Private Sub optDocument_Click()
    Dim i As Integer
    
    On Error GoTo EH
    g_strErrorLocation = "frmShip:optDocument_Click"
    
    If optDocument Then
        chkDuplicate.Enabled = True
        lblDecVal.Caption = "Total Customs Value:"
        lblDecVal.FontBold = True
        fraCommod.Visible = False
        fraDocs.Visible = True
        fraCommodity.Enabled = False
        fraCI.Enabled = False
        fraSEDShipper.Enabled = False
        f413.Enabled = False
        For i = 0 To lblCommodity.UBound
            lblCommodity(i).Enabled = False
        Next
        
        'Added 3/17/05 - changed the label names for CI section
        On Error Resume Next
        For i = 0 To lblCI.UBound
            lblCI(i).Enabled = True
        Next
        On Error GoTo EH
        
        'Added 3/17/05 - changed the label name for ITN/FTSR field
        lbl1358.Enabled = True
        chkB13A.Enabled = False
        cmdAddToShipment.Enabled = False
        grdCommodities.Enabled = False
        cmdMPS.Enabled = False
    End If
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : optRate_Click()
' DateTime  : 6/18/2004
' Purpose   : Option buttons on the Service Quote tab to show List or Discounted rates.
'             f37, f1596, & f1598 are discount rate fields, and f1528, f1597, & f1599
'             are list rate fields.
'---------------------------------------------------------------------------------------
'
Public Sub optRate_Click(Index As Integer)
    Dim i As Integer
    
    On Error GoTo EH
    g_strErrorLocation = "frmShip:optRate_Click"
    
    'Show discount rates
    If Index = 0 Then
        For i = 1 To 6
            lblRate(0).Caption = "Net"
            lblRateDetails.Caption = "Charges"
            f37(i).Visible = True
            f1596(i).Visible = True
            f1598(i).Visible = True
            f1528(i).Visible = False
            f1597(i).Visible = False
            f1599(i).Visible = False
        Next
    'Show list rates
    Else
        For i = 1 To 6
            lblRate(0).Caption = "List Net"
            lblRateDetails.Caption = "List Charges"
            f37(i).Visible = False
            f1596(i).Visible = False
            f1598(i).Visible = False
            f1528(i).Visible = True
            f1597(i).Visible = True
            f1599(i).Visible = True
        Next
    End If
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : optStatus_Click()
' DateTime  : 11/2/2004
' Purpose   : Update History to show either Shipped or Deleted packages.
'---------------------------------------------------------------------------------------
'
Private Sub optStatus_Click(Index As Integer)
    If g_blnFormLoadComplete Then
        If chkIPD(0) = 1 And optType(3) = True Then
            Call UpdateShipmentsGrid("IOR Facility", f1355)
        Else
            Call UpdateShipmentsGrid
            txtSearchValue = ""
        End If
    End If
End Sub
'---------------------------------------------------------------------------------------
' Procedure : optType_Click()
' DateTime  : 11/2/2004
' Purpose   : Update the History to show Express, Ground, Int'l, or IPD pacakges.
'---------------------------------------------------------------------------------------
'
Private Sub optType_Click(Index As Integer)
    On Error GoTo EH
    g_strErrorLocation = "frmShip:optType_Click"
    
    Call LoadSearchFields(Index)
    If g_blnFormLoadComplete Then
        If Index = 3 And f1355 <> "" Then
            cboSearchField.ListIndex = 2
            txtSearchValue = f1355
            Call UpdateShipmentsGrid("IOR Facility", f1355)
        Else
            Call UpdateShipmentsGrid
            txtSearchValue = ""
        End If
    End If
    
    Call SetTrackButtons
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : SSTab1_Click()
' DateTime  : 6/2/2004
' Purpose   : Actions to take when tabs are clicked.
'---------------------------------------------------------------------------------------
'
Public Sub SSTab1_Click(PreviousTab As Integer)
    On Error GoTo EH
    g_strErrorLocation = "frmShip:SSTab1_Click"
    
    With frmSetup
    
        StatusBar1.Panels(2) = ""
        Call SetMenuButton(3, False)    'Disable Track button
        Call SetMenuButton(4, False)    'Disable Ref Track button
        Call SetMenuButton(5, False)    'Disable Rate button
        Call SetMenuButton(6, False)    'Disable Ship button
        Call SetMenuButton(0, True)     'Enable Clear button
        
        Select Case SSTab1.Tab
            Case 0
                If wscFXRS.State = 7 Then
                    Call SetMenuButton(5, True)    'Enable Rate button
                    Call SetMenuButton(6, True)    'Enable Ship button
                End If
                'Only set focus to f1 if form has completed loading and the Setup form is not active
                If g_blnFormLoadComplete Then
                    'Set focus to f1 or cboCustID
                    ' 2005-08-18, JFW
                    On Error Resume Next
                    If f1.Visible Then
                        f1.SetFocus
                    Else
                        cboCustID.SetFocus
                    End If
                    On Error GoTo EH
                End If
            Case 1
                'License Expiration Date calendar
                Calendar2.Today
                'Updated 3/2/05 for Address book shipping
                If f1.Visible = True Then
                    Call UpdateCommodityGrid(f1)
                Else
                    Call UpdateCommodityGrid(cboCustID)
                End If
                
                If wscFXRS.State = 7 Then
                    Call SetMenuButton(5, True)    'Enable Rate button
                    Call SetMenuButton(6, True)    'Enable Ship button
                End If
            Case 3
                cboDestState = f16
                txtDestZip = f17
                txtWeight = f1670
                txtDV = f26
                f57(1) = f57(0)
                f58(1) = f58(0)
                f59(1) = f59(0)
                cboBoxName(1) = cboBoxName(0)
                chkRES = f440
                chkSAT = f1266(0)
                
                chkCOD = IIf(f27(0) = 1 Or f27(2) = 1, 1, 0)
                chkAOD = IIf(f3009(0) = 1 Or f3009(1) = 1, 1, 0)
                chkAPOD = IIf(f3008(0) = 1 Or f3008(1) = 1, 1, 0)
                chkNonSP = IIf(f3018(0) = 1 Or f3018(1) = 1, 1, 0)
                chkSIG = IIf(f3019 = 1, 1, 0)
                chkFHDSpecial(1) = IIf(f3020(0) = 1, 1, 0)
                chkFHDSpecial(2) = IIf(f3020(1) = 1, 1, 0)
                chkFHDSpecial(3) = IIf(f3020(2) = 1, 1, 0)
                
                If wscFXRS.State = 7 Then
                    If .chkDisableButton(5) = 0 Then
                        Call SetMenuButton(5, True)    'Enable Rate button
                    End If
                End If
                If frmSetup.optListandActual Then
                    'opt
                    fraShowType.Visible = True
                ElseIf frmSetup.optActual Then
                    'Call optRate_Click(0)
                    fraShowType.Visible = False
                Else
                    'Call optRate_Click(1)
                    fraShowType.Visible = False
                End If
            Case 4
                'Shipped List Ship Date calendar
                Calendar3.Today
                If chkIPD(0) = 1 Then
                    optType(3) = True
                    txtSearchValue = f1355
                    cboSearchField.ListIndex = 2
                    Call UpdateShipmentsGrid(cboSearchField, txtSearchValue)
'                ElseIf Left(f50, 2) = "US" And (Left(f1274, 2) = "92" Or Left(f1274, 2) = "90") Then
'                    optType(1) = True
'                    Call UpdateShipmentsGrid
'                ElseIf Left(f50, 2) <> "US" Then
'                    optType(2) = True
'                    Call UpdateShipmentsGrid
                Else
'                    optType(0) = True
                    Call UpdateShipmentsGrid
                End If
                
                Call SetTrackButtons
            Case 5
                WebBrowser1.Navigate "www.fedex.com/us/"
                Call SetMenuButton(0, False)    'Disable Clear button
        End Select
    End With
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub

'---------------------------------------------------------------------------------------
' Procedure : Timer1_Timer()
' DateTime  : 4/9/2004
' Modified  : 8/20/2004
' Change    : Added FormLoadComplete boolean to here
' Purpose   : Updates status bar with Winsock state info
'---------------------------------------------------------------------------------------
'
Private Sub Timer1_Timer()
    On Error GoTo EH
    g_strErrorLocation = "frmShip:Timer1_Timer"
    
    Select Case wscFXRS.State
        Case 0
            StatusBar1.Panels(1).Text = "Disconnected from FSMS"
            Call DisableButtons
        Case 1
            StatusBar1.Panels(1).Text = "Socket Open"
        Case 3
            StatusBar1.Panels(1).Text = "Connection Pending"
        Case 4
            StatusBar1.Panels(1).Text = "Resolving Host"
        Case 5
            StatusBar1.Panels(1).Text = "Host Resolved"
        Case 6
            StatusBar1.Panels(1).Text = "Connecting"
        Case 7
            StatusBar1.Panels(1).Text = "Connected to FSMS"
        Case 8
            wscFXRS.Close
            mnuConnect.Caption = "&Connect"
            mnuConnect.Enabled = True
    End Select
    
    '2005-04-12, JFW, Enable address lookup by default at startup.
    '    If Not g_blnFormLoadComplete Then
    '        If f1.Visible Then Call ToggleLookup
    '    End If
    
    '8/20 Moved this from Form Load
    g_blnFormLoadComplete = True
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub

' 2005-08-18, JFW, Post load, carry toggle of integration vs. address book.
Private Sub Timer2_Timer()

    If g_blnFormLoadComplete Then
        Timer2.Enabled = False
        
        App.LogEvent "Ship.Timer2, f1.visible " & CStr(f1.Visible) & ", registry " & CStr(CBool(g_clsReg.GetRegistryValue("LookupCustID", "True")))
        
        If CBool(g_clsReg.GetRegistryValue("LookupCustID", "True")) Then
            If f1.Visible Then
                Call ToggleLookup
            End If
        Else
            If Not f1.Visible Then
                Call ToggleLookup
            End If
        End If
    End If
    
End Sub

'---------------------------------------------------------------------------------------
' Procedure : txtCommodityWgt_Change()
' DateTime  : 3/16/2004
' Purpose   : Wgt Each field is numeric only
'---------------------------------------------------------------------------------------
'
Private Sub txtCommodityWgt_Change()
    Call NumericOnly(txtCommodityWgt)
End Sub
'---------------------------------------------------------------------------------------
' Procedure : txtCommodityWgt_LostFocus()
' DateTime  : 3/16/2004
' Purpose   : Calculate Total commodity wgt
'---------------------------------------------------------------------------------------
'
Private Sub txtCommodityWgt_LostFocus()
    Call CalcTotalWgt
End Sub

Private Sub txtDelDate_Change()
    If Len(txtDelDate) >= 8 Then
        If txtDelDate < Date + 1 Then
            txtDelDate = ""
        End If
    End If
End Sub

'---------------------------------------------------------------------------------------
' Procedure : txtNumPkgs_Change()
' DateTime  : 7/16/2004
' Purpose   : Temporary code until FXRS supports MPS Handling charges in Rate/Route.
'---------------------------------------------------------------------------------------
'
Private Sub txtNumPkgs_Change()
    txtNumPkgs = "1"
End Sub
'---------------------------------------------------------------------------------------
' Procedure : txtSearchValue_Change()
' DateTime  : 10/6/2004
' Purpose   : Extracts the Express or Ground Trk# if barcode is scanned.
'---------------------------------------------------------------------------------------
'
Private Sub txtSearchValue_Change()
    
    If cboSearchField = "Trk #" Then
            'Extracts trk# from a ASTRA barcode scanned into the f29 field
        If Len(txtSearchValue) = 32 And (Left(txtSearchValue, 1) = "3" Or Left(txtSearchValue, 1) = "4") Then
            txtSearchValue = Mid(txtSearchValue, 17, 12)
        End If
        'Extracts trk# from a FedEx Ground barcode scanned into the f29 field
        If Len(txtSearchValue) = 22 And Left(txtSearchValue, 2) = "96" Then
            txtSearchValue = Right(txtSearchValue, 15)
        End If
    End If

End Sub
'---------------------------------------------------------------------------------------
' Procedure : txtShipDate_LostFocus()
' DateTime  : 3/18/2004
' Purpose   : Used on this Shipped List tab to show shipments for a given date.
'---------------------------------------------------------------------------------------
'
Private Sub txtShipDate_LostFocus()
    ' 2005-08-28, JFW, Allow for blank date.
    If IsDate(txtShipDate) Then
        If DateDiff("d", Date, CDate(txtShipDate)) <> 0 Then
            txtShipDate.BackColor = &HC0E0FF
        Else
            txtShipDate.BackColor = &HFFFFFF
        End If
    End If
    
    Call UpdateShipmentsGrid
End Sub

Private Sub WebBrowser1_NavigateComplete2(ByVal pDisp As Object, URL As Variant)
    If InStr(1, URL, "https://www.fedex.com/cgi-bin/tracking?") > 0 Then
        StatusBar1.Panels(2) = "Tracking Complete"
    End If
End Sub

'---------------------------------------------------------------------------------------
' Procedure : wscFXRS_Connect
' DateTime  : 12/08/2003
' Purpose   : Winsock connect event. Change mnuConnect caption to Disconnect and enable
'             all buttons that require FXRS connectivity.
'---------------------------------------------------------------------------------------
'
Private Sub wscFXRS_Connect()
        mnuConnect.Caption = "&Disconnect"
        StatusBar1.Panels(1).Text = "Connected to " & frmSetup.cboFXRSIP
        StatusBar1.Panels(2) = ""
        Call EnableButtons
End Sub
'---------------------------------------------------------------------------------------
' Procedure : wscFXRS_Error
' DateTime  : 12/08/2003
' Modified  : 9/8/2004 - Changed message to support multiple hosts. If only one host
'             show error and Retry/Cancel, if 2 hosts show OK/Cancel to try the  backup,
'             else show OK/Cancel to show Setup to select which host to try.
' Purpose   : Winsock error event. Show error MsgBox, close connection and enable
'             Connect button.
'---------------------------------------------------------------------------------------
'
Private Sub wscFXRS_Error(ByVal number As Integer, Description As String, ByVal Scode As Long, ByVal Source As String, ByVal HelpFile As String, ByVal HelpContext As Long, CancelDisplay As Boolean)
    On Error GoTo EH
    g_strErrorLocation = "frmShip:wscFXRS_Error"
    
    Dim strMessage As String
    Dim ret As Integer
    Dim i As Integer
   
    wscFXRS.Close
    mnuConnect.Caption = "&Connect"
    mnuConnect.Enabled = True
    StatusBar1.Panels(2) = "FSMS Connection Error"
    
    With frmSetup
        If .cboFXRSIP.ListCount = 1 Then
            strMessage = "The following error occurred while attempting" & vbCrLf
            strMessage = strMessage & " to communicate with the FSMS Server:" & vbCrLf & vbCrLf
            strMessage = strMessage & Chr(34) & Description & Chr(34) & vbCrLf & vbCrLf
            strMessage = strMessage & "Click Retry to try this connection again or "
            strMessage = strMessage & "click Cancel to exit."
            strMessage = strMessage & vbCrLf & vbCrLf & "Please notify your system administrator of this problem!"
            
            ret = MsgBox(strMessage, vbRetryCancel, "Communication Error")
    
            If ret = 4 Then
                Call mnuConnect_Click
            End If
        ElseIf .cboFXRSIP.ListCount = 2 Then
            strMessage = "The following error occurred while attempting to communicate " & vbCrLf
            strMessage = strMessage & "with the FSMS Server at address " & .cboFXRSIP & ":" & vbCrLf & vbCrLf
            strMessage = strMessage & Chr(34) & Description & Chr(34) & vbCrLf & vbCrLf
            strMessage = strMessage & "Click OK to try the backup server or click Cancel to exit."
            strMessage = strMessage & vbCrLf & vbCrLf & "Please notify your system administrator of this problem!"
            
            ret = MsgBox(strMessage, vbOKCancel, "Communication Error")
            If ret = 1 Then
                .cboFXRSIP.ListIndex = IIf(.cboFXRSIP.ListIndex = 0, 1, 0)
                Call mnuConnect_Click
            End If
        Else
            strMessage = "The following error occurred while attempting to communicate " & vbCrLf
            strMessage = strMessage & "with the FSMS Server at address " & .cboFXRSIP & ":" & vbCrLf & vbCrLf
            strMessage = strMessage & Chr(34) & Description & Chr(34) & vbCrLf & vbCrLf
            strMessage = strMessage & "Click OK to select a backup server or click Cancel to exit."
            strMessage = strMessage & vbCrLf & vbCrLf & "Please notify your system administrator of this problem!"
            
            ret = MsgBox(strMessage, vbOKCancel, "Communication Error")
            If ret = 1 Then
                With frmSetup
                    For i = 1 To .SSTab1.Tabs - 1
                        .SSTab1.TabEnabled(i) = False
                    Next
                    .Show vbModeless, Me
                    .cboFXRSIP.SetFocus
                End With
            End If
        End If
    End With
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : wscFXRS_DataArrival
' DateTime  : 12/08/2003
' Purpose   : Winsock DataArrival event. Once 99,"" is received call g_clsParser.ParseData
'             method.
'---------------------------------------------------------------------------------------
'
Private Sub wscFXRS_DataArrival(ByVal bytesTotal As Long)
    Dim strReply As String    'var to store the reply
    
    On Error GoTo EH
    g_strErrorLocation = "frmShip:wscFXRS_DataArrival"
    
    'Get the data from Winsock
    wscFXRS.GetData strReply, bytesTotal
    'Store current data packet in case reply takes multiple packets
    
    Debug.Print Now, "DataArrival",
    Debug.Print strReply
    
    g_strReply = g_strReply & strReply
    
    'Check for 99,"" to see if you got the whole transaction else exit
    If InStr(1, strReply, "99," & Chr(34) & Chr(34)) = 0 Then
        Exit Sub
    Else
        Debug.Print Now, g_strErrorLocation,
        Debug.Print g_strReply
        g_strSaveReply = g_strReply
        g_clsParser.ParseData g_strReply
        g_strReply = ""
    End If
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : g_clsParser_ParseComplete
' DateTime  : 11/28/2003
' Modified  : 11/11/2004 - Added Version Capture Reply Case "170"
' Purpose   : clsFXRSParser class Event fires when a transaction has been completely parsed.
'           : Select Case statement inside of the For loop allows us to grab the fields
'           : needed from the FXRS reply.
'---------------------------------------------------------------------------------------
'
Private Sub g_clsParser_ParseComplete()
    On Error GoTo EH
    g_strErrorLocation = "frmShip:g_clsParser_ParseComplete"
    
    Dim i As Integer
    Dim j As Integer
    Dim strReplyType As String
    Dim strTemp29 As String             'Temp var to hold trk# not returned on delete error
    Dim str29() As String               'Used to store MPS trk# for SaveShipment
    Dim str3063() As String             'Used to store MPS Ground barcode strings for custom labels
    Dim bCustomGroundMPS As Boolean     'True indicates MPS Ground custom labels
    
    ReDim str29(Val(f116))
    ReDim str3063(Val(f116))
    'Added 9/14 for custom Ground MPS labels
    If (g_str1274 = "92" Or g_str1274 = "90") And frmSetup.chkCustomLabels = 1 Then
        bCustomGroundMPS = True
    Else
        bCustomGroundMPS = False
    End If
    
    strTemp29 = g_str29
    'Clear the variables
    g_str3 = ""
    g_str29 = ""
    g_str37 = ""
    g_str560 = ""
    g_str1123 = ""
    g_str1125 = ""
    
    With g_clsParser
        For i = 0 To .TotalFields - 1
            Select Case .Field(i)
                Case "0"                    'Trans Type
                    strReplyType = .Data(i)
                Case "1"                    'TransID
                    g_str1 = .Data(i)
                Case "3"                    'Error message
                    g_str3 = .Data(i)
                Case "29"                   'Trk#
                    g_str29 = .Data(i)
                Case "37"                   'Net charges for rate trans
                    g_str37 = .Data(i)
                Case "560"                  'Return on Ground rating errors
                    g_str560 = .Data(i)
                Case "1123"                 'Master trk# for IPD
                    g_str1123 = .Data(i)
                Case "1125"                 'Returned on Rating errors
                    g_str1125 = .Data(i)
            End Select
            If Val(f116) > 1 Then
                For j = 2 To Val(f116)
                    If .Field(i) = "29-" & Trim(Str(j)) Then str29(j) = .Data(i)
                    If .Field(i) = "3063-" & Trim(Str(j)) Then str3063(j) = .Data(i)
                Next
            End If
        Next
    End With
    
    Select Case strReplyType
        Case "120"
            'Indicates a Rate from the Ship tab
            If g_blnRate Then
                If g_str3 = "" And (g_str1125 = "0" Or g_str1125 = "") Then
                    StatusBar1.Panels(2) = "Rate: $" & Format(Val(g_str37) * 0.01, "#####.00")
                Else
                    StatusBar1.Panels(2) = "Rate Error: " & GetRateError(g_str1125)
                End If
                g_blnRate = False
            
            'Indicates a Batch Error Check
            ElseIf g_blnBatchErrorCheck Then
                
                Call WriteBatchError
            
            'Indicates an IPD Shipment
            ElseIf g_blnIPD Then
                
                Call IPDReply
            
            'Else it's a Ship trans
            Else
                If g_str3 <> "" Then
                    If g_blnBatch Then
                        Call WriteBatchError
                    Else
                        Call WriteError
                        frmShip.StatusBar1.Panels(2) = "Shipment Error"
                        'Clear MPS flag so buttons will be enabled
                        g_blnMPS = False
                    End If
                Else
                    If frmSetup.chkCustomLabels = 1 Then
                        Call CreateCustomLabel
                        'Modified 9/30 for Ground MPS Custom labels - add check for "B"
                        If bCustomGroundMPS And g_str1282 = "B" Then
                            For j = 2 To Val(f116)
                                Call CreateCustomLabel(j, str3063(j))
                            Next
                        End If
                    End If
                    
                    'Call routines to WriteReply
                    If g_blnBatch Then
                        Call WriteBatchReply
                    ElseIf g_blnBatchEdit Then
                        Call WriteBatchReply
                        g_blnBatchEdit = False
                        frmShip.StatusBar1.Panels(2) = "Shipment Complete"
                    ElseIf g_blnMPS Then
                        Call WriteReply
                    Else
                        Call WriteReply
                        frmShip.StatusBar1.Panels(2) = "Shipment Complete"
                    End If
                    
                    'Added 8/31 to save Address if visible and checkbox checked
                    If cboCustID.Visible = True And chkAddAddress = 1 Then
                        Call SaveAddress(cboCustID)
                        Call LoadAddrLookupCombos(cboCustID, cboCustID, "CustID")
                        Call LoadAddrLookupCombos(cboContact, cboContact, "f12")
                        Call LoadAddrLookupCombos(cboCompany, cboContact, "f11")
                    End If
                    
                    'Save single piece trk# or Master trk# from MPS
                    If Not g_blnCODNextPiece Then
                        Call SaveShipment(g_str29, 1)
                    Else
                        Call SaveShipment(g_str29, 2)
                    End If
                    
                    'Save MPS trks#
                    If chkDuplicate = 0 And Val(f116) > 1 _
                                        And Not g_blnCODFirstPiece _
                                        And (g_str50 = g_str117 Or (g_str1274 = "92" Or g_str1274 = "90")) _
                                        And ((g_str1274 = "92" Or g_str1274 = "90") _
                                            Or (g_str1274 <> "92" And g_str1274 <> "90" And g_str27 <> "Y")) Then '
                        
                        If g_blnCODNextPiece Then               'All this
                            For i = 2 To Val(f116) - 1          'added for
                                Call SaveShipment(str29(i), i + 1)    'MPS Ground
                            Next                                'COD on
                            g_blnCODNextPiece = False           'first piece
                        Else
                            For i = 2 To Val(f116)
                                Call SaveShipment(str29(i), i)
                            Next
                        End If
                    End If
                    'If there's not an error then continue with duplicates
                    'or clear screen
                    If chkDuplicate = 1 Then
                        If g_str116 > g_intDupCount Then
                            g_intDupCount = g_intDupCount + 1
                            Call ShipButton
                        Else
                            g_intDupCount = 1
                            Call DeleteMPS(g_str1)
                            App.LogEvent "Test, Preassign, ParseComplete, delete preassign, g_str1 `" & g_str1 & "`"
                            Call DeletePreAssign(g_str1)
                            App.LogEvent "Test, Preassign, ParseComplete, delete preassign, g_str1222 `" & g_str1222 & "`"
                            Call DeletePreAssign(g_str1222)     '2005-05-27, JFW
                            Call DeleteIntlCommodities(g_str1)
                            Call ClearShipFields
                            Call ClearGlobalVars
                            Call SetLogo
                        End If
                    ElseIf Not g_blnMPS And frmMPS.chkPrintAsAdd = 0 Then
                        'Added to process return labels if selected
                        For i = 0 To 2
                            If f2382(i) = 1 Then
                                Call SendData(BuildReturnLabel)
                            End If
                        Next
                        Call DeleteMPS(g_str1)
                            App.LogEvent "Test, Preassign, ParseComplete, delete preassign, g_str1 `" & g_str1 & "`"
                        Call DeletePreAssign(g_str1)
                            App.LogEvent "Test, Preassign, ParseComplete, delete preassign, g_str1222 `" & g_str1222 & "`"
                        Call DeletePreAssign(g_str1222)     '2005-05-27, JFW
                        Call DeleteIntlCommodities(g_str1)
                        Call ClearShipFields
                        Call ClearGlobalVars
                        Call SetLogo
                    End If
                End If
            End If
            
       'Delete reply - if error, show FXRS error and trk#
        Case "123"
            
            Call DeleteReply(strTemp29)
        
        'Close reply - if error show FXRS error
        Case "107"
            
            Call CloseReply
        
        'Version Capture reply
        Case "170"
            
            g_blnNextClose = True
    
        Case "104"
            
            Debug.Print Now, "ParseComplete 1"
            
            Call TrkNumReply
            
    End Select
    
    'Boolean used to control batch, COD 1st piece, TrkNum requests, & multiple deletes.
    'Do next transaction.
    g_blnComplete = True
    
    Debug.Print Now, "ParseComplete 2"
    
    'Enable all transaction buttons if not batch or MPS processing
    If Not g_blnBatch And Not g_blnMPS And Not g_blnPreAssign Then
        
        Debug.Print Now, "ParseComplete 3"
        
        Call EnableButtons
    End If
    
    Debug.Print Now, "ParseComplete Done"
    
    Exit Sub
EH:
     MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Module    : DeleteReply()
' DateTime  : 2/10/2005
' Author    : Chris Elwell
' Purpose   : Handle Close Replies. Moved out of ParseComplete.
'---------------------------------------------------------------------------------------
'
Private Sub DeleteReply(ByVal str29 As String)
    
    On Error GoTo EH
    g_strErrorLocation = "frmShip:DeleteReply"
    
    If g_str3 <> "" And 0 = InStr(1, g_str3, " is already deleted") Then
        MsgBox g_str3 & " : " & str29, vbExclamation, "Delete Error"
        frmDelete.f29.BackColor = &HC0E0FF
        frmDelete.f29.SelStart = 0
        frmDelete.f29.SelLength = Len(frmDelete.f29)
        frmShip.StatusBar1.Panels(2) = "Delete Error"
    Else
        Call ChangeStatusToDelete(g_str29)
        Call WriteDelete(g_str29)
        'Handle writing package delete
        frmDelete.f29 = ""
        frmDelete.f29.BackColor = &HC0E0FF
        StatusBar1.Panels(2) = g_str29 & " Deleted!"
        If g_blnDeletesComplete Then
            Call UpdateShipmentsGrid
            Call SetTrackButtons
        End If
    End If
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Module    : CloseReply()
' DateTime  : 2/10/2005
' Author    : Chris Elwell
' Purpose   : Handle Close Replies. Moved out of ParseComplete.
'---------------------------------------------------------------------------------------
'
Private Sub CloseReply()
            
    If g_str3 <> "" Then
        frmClose.lstCloseStatus.AddItem "Close Error: " & g_str3
    Else
        frmClose.lstCloseStatus.AddItem "Close Complete!"
    End If
    g_blnNextClose = True
    
    Call AfterClose

End Sub
'---------------------------------------------------------------------------------------
' Module    : IPDReply()
' DateTime  : 2/10/2005
' Author    : Chris Elwell
' Purpose   : Handle IPD Replies. Moved out of ParseComplete.
'---------------------------------------------------------------------------------------
'
Private Sub IPDReply()
    
    On Error GoTo EH
    g_strErrorLocation = "frmShip:IPDReply"
    
    If g_str3 = "" Then
        Select Case Left(g_str1, 15)
            'Create shipment
            Case "IPD MAWB CREATE"
                Call SaveIPDShipment(g_str29, True)
                frmIPDAdd.Hide
                With frmIPD
                    .f24 = frmIPDAdd.f24
                    f24 = .f24
                    .cboIPDStatus = "Open"
                    Call .UpdateIPDGrid("Open", .f24)
                    frmShip.StatusBar1.Panels(2) = "MAWB Created"
                End With
                Call frmIPDAdd.SaveIOR
                Call LoadIORCombo(frmSetup.f10, f24)
                With frmIPDAdd
                    .f1297 = ""
                    .f1358 = ""
                End With
            'Delete shipment
            Case "IPD MAWB DELETE"
                Call ChangeIPDStatus(Right(g_str1, 12), "Deleted")
                With frmIPD
                    .f24 = frmIPDAdd.f24
                    .cboIPDStatus = "Open"
                    Call .UpdateIPDGrid("Open", .f24)
                    frmShip.StatusBar1.Panels(2) = "MAWB Deleted"
                End With
                Call LoadIORCombo(frmSetup.f10, f24)
            'Confirm shipment
            Case "IPD MAWB CONFRM"
                g_blnIPDConfirm = False
                Call ChangeIPDStatus(g_str1123, "Confirmed")
                frmIPDAdd.Hide
                With frmIPD
                    .f24 = frmIPDAdd.f24
                    .cboIPDStatus = "Open"
                    Call .UpdateIPDGrid("Open", .f24)
                End With
                Call LoadIORCombo(frmSetup.f10, f24)
                With frmIPDAdd
                    .f1297 = ""
                    .f1358 = ""
                    .f119 = ""
                    .f79 = ""
                End With

                frmShip.StatusBar1.Panels(2) = "MAWB Confirmed"
            'Delete shipment
            Case "IPD CRN DELETE "
                Call ChangeCRNStatus(g_str29)
                With frmIPD
                    .f24 = frmIPDAdd.f24
                    .cboIPDStatus = "Open"
                    Call .UpdateIPDGrid("Open", .f24)
                    Call WriteDelete(g_str29)
                    frmShip.StatusBar1.Panels(2) = "CRN Deleted"
                    StatusBar1.Panels(2) = g_str29 & " Deleted!"
                    If g_blnDeletesComplete Then
                        Call UpdateShipmentsGrid
                        Call SetTrackButtons
                    End If
                End With
            'Add CRN
            Case Else
                Call SaveIPDShipment(g_str29, False, g_str1123)
                Call WriteReply
                frmShip.StatusBar1.Panels(2) = "Shipment Complete"
        End Select
        Call DeleteIntlCommodities(g_str1)
        Call ClearShipFields
        Call ClearGlobalVars
        Call SetLogo
    Else
        Call WriteError
        frmShip.StatusBar1.Panels(2) = "Shipment Error"
    End If
    'Make sure the IPD flag is set to the correct boolean value
    If chkIPD(0) = 0 Then
        g_blnIPD = False
    Else
        g_blnIPD = True
    End If
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Module    : TrkNumReply()
' DateTime  : 3/1/2005
' Author    : Chris Elwell
' Purpose   : Handle Trk# Request Replies.
'---------------------------------------------------------------------------------------
'
Private Sub TrkNumReply()
    
    On Error GoTo EH
    g_strErrorLocation = "frmShip:TrkNumReply"
    
    Dim i As Integer
    Dim f1 As String        'Order ID
    Dim f28 As String       'COD Return Trk#
    Dim f29 As String       'Trk#
    Dim f526 As String      'FormID
    Dim f527 As String      'COD Return Form ID
    
    If g_str3 <> "" Then
        MsgBox g_str3, vbExclamation, "Trk# Request Error"
        frmShip.StatusBar1.Panels(2) = "Trk# Request Error"
    Else
        With g_clsParser
            For i = 0 To .TotalFields
                Select Case .Field(i)
                    Case "1"
                        f1 = .Data(i)
                    Case "28"
                        f28 = .Data(i)
                    Case "29"
                        f29 = .Data(i)
                    Case "526"
                        f526 = .Data(i)
                    Case "527"
                        f527 = .Data(i)
               End Select
            Next
            Call SavePreAssign(f1, f28, f29, f526, f527)
        End With
    End If
    
    Debug.Print Now, "TrkNumReply"
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Module    : SavePreAssign()
' DateTime  : 3/1/2005
' Author    : Chris Elwell
' Purpose   : Inserts trk#s into PreAssign table.
'---------------------------------------------------------------------------------------
'
Private Sub SavePreAssign(ByVal f1 As String, ByVal f28 As String, _
                       ByVal f29 As String, ByVal f526 As String, ByVal f527 As String)
    
    On Error GoTo EH
    g_strErrorLocation = "frmShip:SavePreAssign"
    
    Dim strQuery As String
    
    strQuery = "INSERT INTO PreAssign Values (" & SingleQuotes(f1) & ","
    strQuery = strQuery + SingleQuotes(f28) & ","
    strQuery = strQuery + SingleQuotes(f29) & ","
    Select Case f526
        Case "0201"
            strQuery = strQuery + SingleQuotes("Express US Domestic") & ","
        Case "0430"
            strQuery = strQuery + SingleQuotes("Express Intl Master") & ","
        Case "0441"
            strQuery = strQuery + SingleQuotes("Express Intl MPS") & ","
        Case "0301"
            strQuery = strQuery + SingleQuotes("Express COD Master") & ","
        Case "0261"
            strQuery = strQuery + SingleQuotes("Express COD MPS") & ","
        Case "0451"
            strQuery = strQuery + SingleQuotes("Canada") & ","
        Case ""
            strQuery = strQuery + SingleQuotes("Ground/FHD") & ","
    End Select
    strQuery = strQuery + SingleQuotes(f527) & ")"
    
    Debug.Print Now, "SavePreAssign", strQuery
    
    g_connFSMSClient.Execute strQuery
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Module    : DeletePreAssign()
' DateTime  : 3/2/2005
' Author    : Chris Elwell
' Purpose   : Deletes trk#s from PreAssign table.
'---------------------------------------------------------------------------------------
'
Private Sub DeletePreAssign(ByVal str1 As String)
    
    On Error GoTo EH
    g_strErrorLocation = "frmShip:DeletePreAssign"
    
    Dim strQuery As String
    
    App.LogEvent "Test, PreAssign, DeletePreAssign, key " & str1
    
    strQuery = "DELETE FROM PreAssign WHERE f1 = " & SingleQuotes(str1)
    
    g_connFSMSClient.Execute strQuery
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Module    : ShipButton()
' DateTime  : 3/16/2004
' Modified  : 2/21/2005 - Added code to ship only if function BeforeShip returns True.
' Author    : Chris Elwell
' Purpose   : Call subroutines to ship packages
'---------------------------------------------------------------------------------------
'
Private Sub ShipButton()
    Dim i As Integer
    
    On Error GoTo EH
    g_strErrorLocation = "frmShip:ShipButton"
    
    'Assign the text fields to global vars
    Call AssignTextToGlobal
    
    'CIC defined routine that runs before shipping the package.
    'Return True to continue shipment, False to Cancel.
    
    If BeforeShip Then
    
        'Show Processing in status bar
        frmShip.StatusBar1.Panels(2) = "Processing..."
        
        'Disable all transaction buttons
        Call DisableButtons
    
        With frmMPS
            Call .UpdateMPSGrid(g_str1)
            
            'US Domestic
            If g_str117 = "US" And g_str50 = "US" And g_str16 <> "PR" Then
                'Build Domestic single or duplicate piece transaction then send it
                If Val(f116) = 1 Or chkDuplicate = 1 Then
                    Call SendData(BuildDomShipTrans)
                
                'Build Domestic MPS transaction then send it
                ElseIf Val(f116) > 1 And chkDuplicate = 0 Then
                        
                        'Added 8/6 for MPS Ground COD on 1st Piece only
                        If frmCOD.chkCOD1stPiece = 1 And f27(2) = 1 Then
                            Call .ShipCODFirstPiece
                        Else
                            Call .ShipMPS
                        End If
                End If
            'Added 1/27/05 for Intra-Canada
            ElseIf g_str117 = "CA" And g_str50 = "CA" Then
                If Val(f116) = 1 Or chkDuplicate = 1 Then
                    Call SendData(BuildCADomShipTrans)
                
                'Build Domestic MPS transaction then send it
                Else
                
                    If Val(f116) > 1 And g_rsMPS.RecordCount > 0 Then
                        g_str1670 = ""
                        g_str57 = ""
                        g_str58 = ""
                        g_str59 = ""
                        g_str26 = ""
                        g_str25 = ""
                        g_str3056 = ""
                        g_str3057 = ""
                        g_str3018 = ""
                        Call SendData(BuildDomMPSShipTrans(g_str1))
                    Else
                        Call SendData(BuildCADomShipTrans)
                    End If
                End If
            'US and CA Export
            Else
                If chkIPD(0) = 1 Then
                    Call SendData(BuildIPDShipTrans(g_str1))
                Else
                    'Build Intl doc transaction then send it
                    If optDocument Then
                        Call SendData(BuildIntlDocShipTrans)
                    
                    'Build Intl MPS transaction then send it
                    ElseIf optCommodities Then
                        
                        'Clear these if using the MPS form to process Intl MPS
                        If g_rsMPS.RecordCount > 0 Then
                            g_str1670 = ""
                            g_str57 = ""
                            g_str58 = ""
                            g_str59 = ""
                            g_str26 = ""
                            g_str25 = ""
                            g_str3056 = ""
                            g_str3057 = ""
                            g_str3018 = ""
                        End If
                        Call SendData(BuildIntlMPSShipTrans(g_str1))
                    End If
                End If
            End If
        End With
    
        SSTab1.Tab = 0
    
    End If
   
    Exit Sub
EH:
     MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Module    : Image2_Click()
' DateTime  : 3/16/2004
' Author    : Chris Elwell
' Purpose   : Show the ShipDate calendar
'---------------------------------------------------------------------------------------
'
Private Sub Image2_Click()
    Calendar1.Visible = True
End Sub
'---------------------------------------------------------------------------------------
' Module    : mnuExit_Click()
' DateTime  : 3/16/2004
' Author    : Chris Elwell
' Purpose   : Verify user wishes to Exit and shutdown if Yes.
'---------------------------------------------------------------------------------------
'
Private Sub mnuExit_Click()
    
    On Error Resume Next
    
    Dim Reply
    
    Reply = MsgBox("Are you sure you want to Exit?", vbYesNo, "Exit FSMS Client")
    
    If Reply = vbYes Then
        Unload Me
    End If

End Sub
'---------------------------------------------------------------------------------------
' Module    : mnuSetup_Click()
' DateTime  : 3/16/2004
' Author    : Chris Elwell
' Purpose   : Show Setup Password form.
'---------------------------------------------------------------------------------------
'
Private Sub mnuSetup_Click()
    frmSetupPassword.Show vbModeless, Me
End Sub
'---------------------------------------------------------------------------------------
' Module    : DisableButtons
' DateTime  : 3/16/2004
' Modified  : 10/26/2004 - Added IPD form buttons
' Author    : Chris Elwell
' Purpose   : Disables all buttons that perform functions requiring an FXRS connection.
' Call from : cmdShipAll_Click(), mnuConnect_Click(), Form_Load
'---------------------------------------------------------------------------------------
'
Public Sub DisableButtons()
    
    On Error GoTo EH
    g_strErrorLocation = "frmShip:DisableButtons"
    
    Call SetMenuButton(1, False)    'Disable Delete button
    Call SetMenuButton(2, False)    'Disable Close button
    Call SetMenuButton(5, False)    'Disable Rate button
    Call SetMenuButton(6, False)    'Disable Ship button
    cmdShipAll.Enabled = False      'Disable ShipAll button on Batch tab
    cmdShipAll.BackColor = &HE0E0E0
    
    'Added 3/2/05 for Pre-Assign on menu
    mnuPreAssign.Enabled = False
    
    With frmMPS
        .cmdShip.Enabled = False      'Disable Ship button on MPS form
        .cmdShip.BackColor = &HE0E0E0
        If .chkPrintAsAdd = 1 Then .cmdAddMPS.Enabled = False
    End With
    'Added 10/26/04 for IPD
    With frmIPD
        .cmdADDIPD.Enabled = False
        .cmdADDIPD.BackColor = &HE0E0E0
        .cmdConfirmIPD.Enabled = False
        .cmdConfirmIPD.BackColor = &HE0E0E0
        .cmdDeleteIPD.Enabled = False
        .cmdDeleteIPD.BackColor = &HE0E0E0
    End With
    Exit Sub
EH:
     
    MsgBox Err.Description, vbCritical, g_strErrorLocation
    
End Sub
'---------------------------------------------------------------------------------------
' Module    : EnableButtons
' DateTime  : 3/16/2004
' Author    : Chris Elwell
' Purpose   : Enables all buttons that perform functions requiring an FXRS connection.
' Call from : cmdShipAll_Click(), wsc_Connect()
'---------------------------------------------------------------------------------------
'
Public Sub EnableButtons()
    
    On Error GoTo EH
    g_strErrorLocation = "frmShip:EnableButtons"
    
    mnuConnect.Enabled = True
    'Added 3/2/05 for Pre-Assign on menu
    mnuPreAssign.Enabled = True
    'If on Ship or Intl tab, enable Ship button
    If SSTab1.Tab = 0 Or SSTab1.Tab = 1 Then
        Call SetMenuButton(6, True)
    End If
    'If on Ship, Intl, or Quote tab enable Rate button
    If SSTab1.Tab = 0 Or SSTab1.Tab = 1 Or SSTab1.Tab = 3 Then
        Call SetMenuButton(5, True)
    End If
    
    Call SetMenuButton(1, True)     'Enable Delete button
    Call SetMenuButton(2, True)     'Enable Close button
    cmdShipAll.Enabled = True       'Enable ShipAll button on Batch tab
    cmdShipAll.BackColor = &HC0E0FF
    With frmMPS
        If .chkPrintAsAdd = 0 Then      'Only enable if not printing as adding
            .cmdShip.Enabled = True     'Enable Ship button on MPS form
            .cmdShip.BackColor = &HC0E0FF
        End If
        .cmdAddMPS.Enabled = True   'Enable Add To Shipment/Print button on MPS form
    End With
    'Added 10/26/04 for IPD
    With frmIPD
        .cmdADDIPD.Enabled = True
        .cmdADDIPD.BackColor = &HC0E0FF
        .cmdConfirmIPD.BackColor = &HC0E0FF
        .cmdDeleteIPD.BackColor = &HC0E0FF
        Call .SetButtons
    End With
    Exit Sub
EH:
     
    MsgBox Err.Description, vbCritical, g_strErrorLocation
    
End Sub
'---------------------------------------------------------------------------------------
' Module    : LoadServices
' DateTime  : 1/27/2005
' Author    : Chris Elwell
' Purpose   : Moved all code to separate Subs for US and CA. See LoadUSServices and
'             LoadCAServices below.
' Call from : f50_Change(), f50_Click(), Form_Load()
'---------------------------------------------------------------------------------------
'
Private Sub LoadServices(Optional ByVal strCurrentValue As String)
    
    On Error GoTo EH
    g_strErrorLocation = "frmShip:LoadServices"
    
    ' 2005-08-31, JFW, Carry
    If strCurrentValue = "" Then
        strCurrentValue = g_clsReg.GetRegistryValue("ServiceType", "")
    End If
    
    If Left(frmSetup.f117, 2) = "US" Then
        Call LoadUSServices(strCurrentValue)
    ElseIf Left(frmSetup.f117, 2) = "CA" Then
        Call LoadCAServices(strCurrentValue)
    End If
    
    Exit Sub
EH:
     
    MsgBox Err.Description, vbCritical, g_strErrorLocation
    
End Sub
Private Sub LoadUSServices(Optional ByVal strCurrentValue As String)
    
    Dim i As Integer
    
    On Error GoTo EH
    g_strErrorLocation = "frmShip:LoadUSServices"
    
    'Clear services
    f1274.Clear
    'Show services based country
   
    'US Domestic
    If Left(f50, 2) = "US" And Left(f16, 2) <> "PR" Then
        f1274.AddItem "01 - FedEx Priority Overnight"
        f1274.AddItem "05 - FedEx Standard Overnight"
        f1274.AddItem "03 - FedEx 2Day"
        f1274.AddItem "06 - FedEx First Overnight"
        f1274.AddItem "20 - FedEx Express Saver"
        f1274.AddItem "90 - FedEx Home Delivery"
        f1274.AddItem "92 - FedEx Ground"
        f1274.AddItem "70 - FedEx 1Day Freight"
        f1274.AddItem "80 - FedEx 2Day Freight"
        f1274.AddItem "83 - FedEx 3Day Freight"
    'US Export
    ElseIf chkIPD(0) = 0 Then
        f1274.AddItem "01 - FedEx International Priority"
        f1274.AddItem "03 - FedEx International Economy"
        f1274.AddItem "06 - FedEx International First"
        f1274.AddItem "70 - FedEx International Priority Freight"
        f1274.AddItem "86 - FedEx International Economy Freight"
        If Left(f50, 2) = "CA" Then
            f1274.AddItem "90 - FedEx Home Delivery"
            f1274.AddItem "92 - FedEx Ground"
        End If
    'IPD
    Else
        f1274.AddItem "18 - FedEx Int'l Priority Distribution"
        f1274.ListIndex = 0
    End If
    
    For i = 0 To f1274.ListCount - 1
        If strCurrentValue = Left(f1274.List(i), 2) Then
            f1274.ListIndex = i
            Exit For
        Else
            f1274.ListIndex = -1
        End If
    Next

    Exit Sub
EH:
     
    MsgBox Err.Description, vbCritical, g_strErrorLocation
    
End Sub
Private Sub LoadCAServices(Optional ByVal strCurrentValue As String)
    
    Dim i As Integer
    
    On Error GoTo EH
    g_strErrorLocation = "frmShip:LoadCAServices"
    
    'Clear services
    f1274.Clear
    'Intra CA
    If Left(f50, 2) = "CA" Then
        f1274.AddItem "01 - FedEx Priority Overnight"
        f1274.AddItem "03 - FedEx 2Day"                         '2005-05-27, JFW
        f1274.AddItem "06 - FedEx First Overnight"
        f1274.AddItem "92 - FedEx Ground"
        f1274.AddItem "70 - FedEx 1Day Freight"                 '2005-05-27, JFW
    'CA Export
    ElseIf chkIPD(0) = 0 Then
        f1274.AddItem "01 - FedEx International Priority"
        f1274.AddItem "03 - FedEx International Economy"
        f1274.AddItem "06 - FedEx International First"
        f1274.AddItem "70 - FedEx International Priority Freight"
        If Left(f50, 2) = "US" Then
            f1274.AddItem "92 - FedEx Ground"
        End If
    'IPD
    Else
        f1274.AddItem "18 - FedEx Int'l Priority Distribution"
        f1274.ListIndex = 0
    End If
    
    For i = 0 To f1274.ListCount - 1
        If strCurrentValue = Left(f1274.List(i), 2) Then
            f1274.ListIndex = i
            Exit For
        Else
            f1274.ListIndex = -1
        End If
    Next

    Exit Sub
EH:
     
    MsgBox Err.Description, vbCritical, g_strErrorLocation
    
End Sub
'---------------------------------------------------------------------------------------
' Module    : LoadPackaging
' DateTime  : 1/27/2005
' Author    : Chris Elwell
' Purpose   : Moved all code to separate Subs for US and CA. See LoadUSPackaging and
'             LoadCAPackaging below.
' Call from : f50_Change(), f50_Click(), Form_Load()
'---------------------------------------------------------------------------------------
'
Private Sub LoadPackaging(Optional ByVal strCurrentValue As String)
    
    On Error GoTo EH
    g_strErrorLocation = "frmShip:LoadPackaging"
    
    ' 2005-08-31, JFW, Carry
    If strCurrentValue = "" Then
        '  debug.print Now, "get", g_clsReg.GetRegistryValue("PackageType", "")
        strCurrentValue = g_clsReg.GetRegistryValue("PackageType", "")
    End If
    
    If Left(frmSetup.f117, 2) = "US" Then
        Call LoadUSPackaging(strCurrentValue)
    ElseIf Left(frmSetup.f117, 2) = "CA" Then
        Call LoadCAPackaging(strCurrentValue)
    End If
    
    Exit Sub
EH:
     
    MsgBox Err.Description, vbCritical, g_strErrorLocation
    
End Sub
Private Sub LoadUSPackaging(Optional ByVal strCurrentValue As String)
    
    Dim i As Integer
    
    On Error GoTo EH
    g_strErrorLocation = "frmShip:LoadUSPackaging"
    
    'Clear packaging
    f1273.Clear
    'Show packaging based on country
    If Left(f50, 2) = "US" And Left(f16, 2) <> "PR" Then
        f1273.AddItem "01 - Your Packaging"
        f1273.AddItem "02 - FedEx Pak"
        f1273.AddItem "03 - FedEx Box"
        f1273.AddItem "04 - FedEx Tube"
        f1273.AddItem "06 - FedEx Envelope"
    Else
        f1273.AddItem "01 - Your Packaging"
        f1273.AddItem "02 - FedEx Pak"
        f1273.AddItem "03 - FedEx Box"
        f1273.AddItem "04 - FedEx Tube"
        f1273.AddItem "06 - FedEx Envelope"
        f1273.AddItem "15 - FedEx 10KG Box"
        f1273.AddItem "25 - FedEx 25KG Box"
    End If
    
    'Set package type to current if it is an available option
    For i = 0 To f1273.ListCount - 1
        If strCurrentValue = Left(f1273.List(i), 2) Then
            '  debug.print Now, "us1", f1273 & ""
            f1273.ListIndex = i
            Exit For
        Else
            '  debug.print Now, "us2", f1273 & ""
            f1273.ListIndex = -1
        End If
    Next

    Exit Sub
EH:
     
    MsgBox Err.Description, vbCritical, g_strErrorLocation
    
End Sub
Private Sub LoadCAPackaging(Optional ByVal strCurrentValue As String)
    
    Dim i As Integer
    
    On Error GoTo EH
    g_strErrorLocation = "frmShip:LoadCAPackaging"
    
    'Clear packaging
    f1273.Clear
    'Show packaging based on country
    If Left(f50, 2) = "CA" Then
        f1273.AddItem "01 - Your Packaging"
        f1273.AddItem "02 - FedEx Pak"
        f1273.AddItem "03 - FedEx Box"
        f1273.AddItem "04 - FedEx Tube"
        f1273.AddItem "06 - FedEx Envelope"
    Else
        f1273.AddItem "01 - Your Packaging"
        f1273.AddItem "02 - FedEx Pak"
        f1273.AddItem "03 - FedEx Box"
        f1273.AddItem "04 - FedEx Tube"
        f1273.AddItem "06 - FedEx Envelope"
        f1273.AddItem "15 - FedEx 10KG Box"
        f1273.AddItem "25 - FedEx 25KG Box"
    End If
    
    'Set package type to current if it is an available option
    For i = 0 To f1273.ListCount - 1
        If strCurrentValue = Left(f1273.List(i), 2) Then
            '  debug.print Now, "ca1", f1273 & ""
            f1273.ListIndex = i
            Exit For
        Else
            '  debug.print Now, "ca2", f1273 & ""
            f1273.ListIndex = -1
        End If
    Next

    Exit Sub
EH:
     
    MsgBox Err.Description, vbCritical, g_strErrorLocation
    
End Sub
'---------------------------------------------------------------------------------------
' Module    : AssignTextToGlobal
' DateTime  : 3/16/2004
' Author    : Chris Elwell
' Purpose   : Assigns the values on all the forms to the appropriate global shipping vars.
' Call from : ShipButton()
'---------------------------------------------------------------------------------------
'
Public Sub AssignTextToGlobal()
    
    On Error GoTo EH
    g_strErrorLocation = "frmShip:AssignTextToGlobal"
    
    'Added 8/31 to support Address Book functionality
    If f1.Visible Then
        g_str1 = f1                                             'Transaction ID
        g_str12 = f12                                           'Recip Contact
        g_str11 = f11                                           'Recip Company
    Else
        g_str1 = cboCustID                                      'Transaction ID
        g_str12 = cboContact                                    'Recip Contact
        g_str11 = cboCompany                                    'Recip Company
    End If
    'If TransID is empty set to Manual with Date/Time stamp
    If g_str1 = "" Then
        g_str1 = "Manual_" & Format(Date, "MMDD") & Format(Time, "HHMMSS")
    End If
    g_str50 = Left(f50, 2)                                  'Recip Country Code
    g_str13 = f13                                           'Recip Addr1
    g_str14 = f14                                           'Recip Addr2
    g_str15 = f15                                           'Recip City
    g_str16 = Left(f16, 2)                                  'Recip State
    g_str17 = RemoveSpecial(f17)                            'Recip Zip
    g_str18 = f18                                           'Recip Phone #
    If f440 = 1 Then
        g_str440 = "Y"                                      'Residential Flag
    Else
        g_str440 = ""
    End If
    g_str1222 = f1222                                       '2005-05-27, JFW, P&W Tracking number
    
    App.LogEvent "Test, PreAssign, AssignTextToGlobal, value " & g_str1222
    
    g_str116 = f116                                         'Number of pkgs
    g_str1670 = f1670                                       'Weight
    g_str75 = f75                                           'Weight type
    g_str1274 = Left(f1274, 2)                              'Service Code
    g_str1273 = Left(f1273, 2)                              'Packaging
    g_str57 = f57(0)                                        'Dim H
    g_str58 = f58(0)                                        'Dim W
    g_str59 = f59(0)                                        'Dim L
    g_str24 = Format(f24, "YYYYMMDD")                       'Ship Date
    g_str26 = f26                                           'Declared Value
    g_str68 = f68                                           'Currency Type
    g_str23 = Left(f23, 1)                                  'Payment Type
    g_str20 = f20                                           'Bill-To Acct#
    
    '2/1/0/2005 Added to capture Department textbox or combo
    g_str38 = IIf(f38.Visible, f38, cboDept)                'Deparment Code
    
    g_str25 = f25                                           'References
    'Special svcs
    g_str1332 = IIf(f1332(0) = 1 Or f1332(1) = 1, "Y", "")  'Alcohol Flag
    g_str27 = IIf(f27(0) = 1 Or f27(1) = 1 Or f27(2) = 1, "Y", "")        'COD Flag
    g_str51 = IIf(f51(0) = 1 Or f51(1) = 1, "Y", "")                         'Sig Rel Flag
    'Added 1/27/05 for CA and US origins
    If g_str117 = "US" Then
        g_str1118 = IIf(f51(0) = 1, f1118(0), "")           'Sig Rel #
    ElseIf g_str117 = "CA" Then
        g_str1118 = IIf(f51(1) = 1, f1118(1), "")           'Sig Rel #
    End If
    g_str1268 = IIf(f1268(0) = 1 Or f1268(1) = 1, "Y", "")  'Dry Ice Flag
    g_str1200 = IIf(f1200(0) = 1 Or f1200(1) = 1 Or f1200(2) = 1 Or f1200(3) = 1, "Y", "")       'Hal Flag
    g_str1266 = IIf(f1266(0) = 1 Or f1266(1) = 1 Or f1266(2) = 1, "Y", "")                     'Sat Del Flag, 2005-03-29, JFW
    g_str1208 = IIf(f1208 = 1, "Y", "")                      'Signature Required
    g_str3008 = IIf(f3008(0) = 1 Or f3008(1) = 1, "Y", "")  'Auto POD
    g_str3009 = IIf(f3009(0) = 1 Or f3009(1) = 1, "Y", "")  'AOD
    g_str3018 = IIf(f3018(0) = 1 Or f3018(1) = 1, "Y", "")  'Non-Standard pkg
    g_str3019 = IIf(f3019 = 1, "Y", "")                     'FHD Sig Svc
    If f3020(0) = 1 Then                                    'FHD Special SVCs
        g_str3020 = "1"
    ElseIf f3020(1) = 1 Then
        g_str3020 = "2"
    ElseIf f3020(2) = 1 Then
        g_str3020 = "3"
    Else
        g_str3020 = ""
    End If
    
    g_str3056 = f3056                                       'Pkg P.O. #
    g_str3057 = f3057                                       'Pkg Invoice #

    'US or CA Export
    If (g_str117 = "US" And (Left(f50, 2) <> "US" Or Left(f16, 2) = "PR")) Or _
        (g_str117 = "CA" And Left(f50, 2) <> "CA") Then
        
        g_str1090 = f1090                                   'Rate Currency
        If optDocument Then
            g_str190 = "Y"                                  'Document flag
            g_str79 = f79Doc                                'Document Type
            g_str80 = Left(f80(1), 2)                       'Country of Manufacture
            g_str74 = Left(f74, 2)                          'Country of Ultimate Dest
        Else
            g_str190 = ""
            g_str70 = Left(f70, 1)                          'Duty/Tax Pay Type
            g_str71 = f71                                   'Duty/Tax Acct#
            g_str74 = Left(f74, 2)                          'Country of Ultimate Dest
            g_str73 = IIf(f73 = 1, "Y", "")                 'Parties Related Flag
            'Added 3/16/05 to use FTSR field for CA IRS/EIN/VAT field
            If g_str117 = "US" Then
                g_str1358 = f1358                           'FTSR Exemption #
            Else
                g_str118 = f1358                            'IRS/EIN/VAT #
            End If
            g_str413 = IIf(f413 = 1, "Y", "N")              'Broker Select
            If g_str113 = "Y" Then                          'CI Flag
                g_str72 = Left(f72, 1)                      'Terms of Sale
                g_str532 = f532                             'CI Freight Charge
                g_str533 = f533                             'CI Insurance Charge
                If Val(f534) > 0 Then
                    g_str534 = f534                         'CI Other Charge
                    g_str1357 = Left(f1357, 2)              'CI Other Chg Type
                End If
                g_str418_1 = f418(1)                        'CI Comment 1
                g_str418_2 = f418(2)                        'CI Comment 2
                g_str418_3 = f418(3)                        'CI Comment 3
            End If
            g_str1174 = IIf(f1174(0) = 1 Or f1174(1) = 1, "Y", "")             'Broker Select
            ' 2007-08-17, JFW, Export permit on Intl screen
            g_str1653 = f1653
        End If
    End If
    
    'IPD added 10/22/04
    If chkIPD(0) = 1 Then
        g_str1355 = f1355
    End If
    
    Exit Sub
EH:
     
    MsgBox Err.Description, vbCritical, g_strErrorLocation
    
End Sub
'---------------------------------------------------------------------------------------
' Module    : ClearShipFields
' DateTime  : 3/16/2004
' Modified  : 10/22/2004 f1355 under ComboBox section
' Author    : Chris Elwell
' Purpose   : Clears most fields on
' Call from : cmdAddToShipment_Click()
'---------------------------------------------------------------------------------------
'
Public Sub ClearShipFields()
    Dim MyForm As Form
    Dim MyControl As Control
    Dim i As Integer
    
    On Error GoTo EH
    g_strErrorLocation = "frmShip:ClearShipFields"
    
    'Clear all text fields except Current Sender fields, ShipDate, and temp transin/transout fields
    For Each MyForm In Forms
        If MyForm.name <> "frmSetup" And MyForm.name <> "frmIPDAdd" Then
            For Each MyControl In MyForm.Controls
                If TypeOf MyControl Is TextBox Then
                    Select Case MyControl.name
                        Case "f24", "txtBatchFilename", "txtTotalRecords", _
                            "txtNumShipped", "txtNumErrors", "txtShipDate"
                        Case Else
                            MyControl = ""
                    End Select
                End If
                If TypeOf MyControl Is CheckBox Then
                    If MyControl.name <> "chkPrintAsAdd" And MyControl.name <> "chkBatchErrorCheck" _
                        And MyControl.name <> "chkAddAddress" And MyControl.name <> "chkIPD" _
                        And MyControl.name <> "f113" Then
                            MyControl = 0
                    End If
                End If
                If TypeOf MyControl Is ComboBox And MyControl.name <> "cboLocationName" And _
                    MyControl.name <> "cboSearchField" And MyControl.name <> "cboBatchProfile" And _
                    MyControl.name <> "f1355" And MyControl.name <> "cboIPDStatus" Then
                    If MyControl.name = "f50" Or MyControl.name = "f80" Then
                        If Not g_blnIPD Then
                            MyControl = g_str117
                        End If
                    '2005-03-29, JFW
                    ElseIf MyControl.name = "f23" Then
                        MyControl.ListIndex = 0
                    '2005-03-29, JFW
                    ElseIf MyControl.name = "f68" Or MyControl.name = "f1090" Then
                        ' MyControl.ListIndex = 0
                    ElseIf MyControl.Style = 0 Then
                        MyControl = ""
                    Else
                        MyControl.ListIndex = -1
                    End If
                End If
            Next
        End If
    Next
    'Clear batch error message from Status bar
    StatusBar1.Panels(3) = ""
    'Updated 3/2/05 for Address book shipping
    If f1.Visible = True Then
        Call UpdateCommodityGrid(f1)
    Else
        Call UpdateCommodityGrid(cboCustID)
    End If
                
    'Set # pkgs to 1 on Ship tab, Service Quote tab, frmMPS
    f116 = "1"
    txtNumPkgs = "1"
    frmMPS.txtNoPkgs = "1"
    
    'Added 12/3 to support non-FXRS custom label fields
    For i = 0 To 9
        g_strCUST(i) = ""
    Next
    
    'Set focus to OrderID Or cboCustID
    If f1.Visible Then
        f1.SetFocus
    Else
        cboCustID.SetFocus
    End If
    
    'Clear Lock OrderID
    g_blnLockOrderID = False
    
    'Clear lookup boolean
    g_blnLookup = False
    
    'Reset chkAddAddress caption to Add
    chkAddAddress.Caption = "Add To Address Book"
    
    'Clear optimization boolean
    g_blnDoOptimize = False
    
    Exit Sub
EH:
     
    MsgBox Err.Description, vbCritical, g_strErrorLocation
    
End Sub
'---------------------------------------------------------------------------------------
' Module    : AddCommodityToMDB
' DateTime  : 3/16/2004
' Modified  : 3/17/2005 - Removed Date and added Part Number f1275
' Author    : Chris Elwell
' Purpose   : Adds a commodity to IntlMPS for the current OrderID
' Call from : cmdAddToShipment_Click()
'---------------------------------------------------------------------------------------
'
Public Sub AddCommodityToMDB()
    Dim strInsertQuery As String
    Dim str414 As String
    
    On Error GoTo EH
    g_strErrorLocation = "frmShip:AddCommodityToMDB"
    
    'Get Unit of Measure
    If InStr(f414, " ") > 0 Then
        str414 = Left(f414, InStr(1, f414, " ") - 1)
    Else
        str414 = f414
    End If
    
    strInsertQuery = "INSERT INTO IntlCommodities VALUES("
    'Added 3/1/05 to support Address Book
    If f1.Visible Then
        strInsertQuery = strInsertQuery + SingleQuotes(f1) + ","
    Else
        strInsertQuery = strInsertQuery + SingleQuotes(cboCustID) + ","
    End If
    strInsertQuery = strInsertQuery + SingleQuotes(f77) + ","
    strInsertQuery = strInsertQuery + SingleQuotes(f79) + ","
    strInsertQuery = strInsertQuery + SingleQuotes(Left(f80(0), 2)) + ","
    strInsertQuery = strInsertQuery + SingleQuotes(f81) + ","
    strInsertQuery = strInsertQuery + SingleQuotes(f82) + ","
    strInsertQuery = strInsertQuery + SingleQuotes(f83) + ","
    strInsertQuery = strInsertQuery + SingleQuotes(f84) + ","
    strInsertQuery = strInsertQuery + SingleQuotes(f120) + ","
    strInsertQuery = strInsertQuery + SingleQuotes(str414) + ","
    strInsertQuery = strInsertQuery + SingleQuotes(f1030) + ","
    strInsertQuery = strInsertQuery + SingleQuotes(f119) + ","
    strInsertQuery = strInsertQuery + SingleQuotes(f1275) + ")"
    
    g_connFSMSClient.Execute strInsertQuery
    
    Exit Sub
EH:
     MsgBox Err.Description, vbCritical, g_strErrorLocation
End Sub
'---------------------------------------------------------------------------------------
' Module    : CalcCustomsValue
' DateTime  : 3/16/2004
' Author    : Chris Elwell
' Purpose   : Calculates a Commodity customs value by multiplying the number of units
'             the unit value.
' Call from : f1030_LostFocus(), f82_LostFocus()
'---------------------------------------------------------------------------------------
'
Private Sub CalcCustomsValue()
    
    If f82 <> "" And f1030 <> "" Then
        f119 = Str(Val(f82) * Val(f1030))
    End If
    
End Sub
'---------------------------------------------------------------------------------------
' Module    : ClearCommodityFields
' DateTime  : 3/16/2004
' Author    : Chris Elwell
' Purpose   : Clears commoidty fields on International tab
' Call from : cmdAddToShipment_Click()
'---------------------------------------------------------------------------------------
'
Private Sub ClearCommodityFields()

    cboCommodityID.ListIndex = -1
    f77 = ""
    f79 = ""
    f81 = ""
    f80(0) = ""
    f82 = ""
    f120 = ""
    f414 = ""
    f1030 = ""
    f1275 = ""
    f119 = ""
    txtCommodityWgt = ""

End Sub
'---------------------------------------------------------------------------------------
' Module    : UpdateCommodityGrid
' DateTime  : 3/16/2004
' Author    : Chris Elwell
' Purpose   : Updates the Commodity datagrid for the OrderID passed
' Call from : cmdAddToShipment_Click(), f1_LostFocus, and ClearShipFields
'---------------------------------------------------------------------------------------
'
Public Sub UpdateCommodityGrid(ByVal strOrderID As String)

    Dim rsCommoditiesQuery As String
    
    On Error GoTo EH
    g_strErrorLocation = "frmShip:UpdateCommodityGrid"
    
    Set g_rsCommodities = New ADODB.Recordset
    rsCommoditiesQuery = "SELECT * FROM IntlCommodities WHERE f1 = '" & strOrderID & "'"
    g_rsCommodities.Open rsCommoditiesQuery, g_connFSMSClient, adOpenKeyset, adLockOptimistic

    Set grdCommodities.DataSource = g_rsCommodities
    grdCommodities.ClearFields
    grdCommodities.ReBind
    grdCommodities.Columns(0).Caption = "Order ID"
    grdCommodities.Columns(1).Caption = "Total Wgt"
    grdCommodities.Columns(2).Caption = "Description"
    grdCommodities.Columns(3).Caption = "Cntry of Manu"
    grdCommodities.Columns(4).Caption = "Harmonized Code"
    grdCommodities.Columns(5).Caption = "Quantity"
    grdCommodities.Columns(6).Caption = "Export Lic #"
    grdCommodities.Columns(7).Caption = "Lic Expire Date"
    grdCommodities.Columns(8).Caption = "Marks and Numbers"
    grdCommodities.Columns(9).Caption = "Unit of Measure"
    grdCommodities.Columns(10).Caption = "Unit Value"
    '2005-04-13, JFW, Commodity grid heading for Total value and Part number.
    grdCommodities.Columns(11).Caption = "Customs Value      "
    grdCommodities.Columns(12).Caption = "Part Number      "
    grdCommodities.Caption = "Total Commodities: " & Str(g_rsCommodities.RecordCount)

    dblCommodityValue = 0
    Do
        If g_rsCommodities.EOF Then Exit Do
        dblCommodityValue = dblCommodityValue + Val(g_rsCommodities.Fields("g_str119").Value & "")
        g_rsCommodities.MoveNext
    Loop
    If Not g_rsCommodities.BOF Then
        g_rsCommodities.MoveFirst
        grdCommodities.Caption = grdCommodities.Caption & " Value: " & dblCommodityValue
    End If
    
Release:
    Set g_rsCommodities = Nothing
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation
    Resume Release
     
End Sub
'---------------------------------------------------------------------------------------
' Module    : LoadCommodities
' DateTime  : 3/16/2004
' Author    : Chris Elwell
' Purpose   : Loads commodity IDs saved in the Commodity table into the cboCommodityID combo box
' Call from : SSTabg1_Click
'---------------------------------------------------------------------------------------
'
Public Sub LoadCommodities()
    Dim rsQuery As String
    Dim rsCommodity As ADODB.Recordset
    
    On Error GoTo EH
    g_strErrorLocation = "frmShip:LoadCommodities"
    
    'Get recordset of Commodity IDs
    Set rsCommodity = New ADODB.Recordset
    rsQuery = "SELECT CommodityID FROM Commodity"
    rsCommodity.Open rsQuery, g_connFSMSClient, adOpenKeyset, adLockOptimistic
    
    'Clear combo and add all Commodity IDs
    cboCommodityID.Clear
    Do While Not rsCommodity.EOF
        cboCommodityID.AddItem rsCommodity("CommodityID")
        rsCommodity.MoveNext
    Loop

Release:
    If rsCommodity.State = adStateOpen Then
        rsCommodity.Close
    End If
    Set rsCommodity = Nothing

    Exit Sub
EH:
     MsgBox Err.Description, vbCritical, g_strErrorLocation
     Resume Release
     
End Sub
'---------------------------------------------------------------------------------------
' Module    : ShowSpecialSvcs
' DateTime  : 3/16/2004
' Modified  : 10/21/2004 - added support for IPD
' Author    : Chris Elwell
' Purpose   : Show the special services for the selected service and set the correct Email
'             fields to show on frmEmail.
' Call from : f1274_Change(), f1274_Click(), f50_Change(), f50_Click()
'---------------------------------------------------------------------------------------
'
Public Sub ShowSpecialSvcs()
    On Error GoTo EH
    g_strErrorLocation = "frmShip:ShowSpecialSvcs"
    
    If Left(frmSetup.f117, 2) = "US" Then
        'US Export
        If Left(f50, 2) <> "US" Or Left(f16, 2) = "PR" Then
            'US to CA Ground
            If Left(f50, 2) = "CA" And Left(f1274, 2) = "92" Then
                fraSpecial(0).Visible = False
                fraSpecial(1).Visible = True
                fraSpecial(2).Visible = False
                fraSpecial(3).Visible = False
                frmEmail.fraEmail(0).Visible = False
                frmEmail.fraEmail(1).Visible = True
                fraSpecial(4).Visible = False
                fraSpecial(5).Visible = False
                fraSpecial(6).Visible = False
            'US to CA FHD
            ElseIf Left(f50, 2) = "CA" And Left(f1274, 2) = "90" Then
                fraSpecial(0).Visible = False
                fraSpecial(1).Visible = False
                fraSpecial(2).Visible = True
                fraSpecial(3).Visible = False
                frmEmail.fraEmail(0).Visible = False
                frmEmail.fraEmail(1).Visible = True
                fraSpecial(4).Visible = False
                fraSpecial(5).Visible = False
                fraSpecial(6).Visible = False
            'US Export
            Else
                fraSpecial(0).Visible = False
                fraSpecial(1).Visible = False
                fraSpecial(2).Visible = False
                fraSpecial(3).Visible = True
                'IPD - shows IPD checkbox and View/Edit button with Int'l
                With frmSetup
                    If .chkIPD = 1 Then
                        chkIPD(0).Visible = True
                        cmdViewIPD(0).Visible = True
                        chkIPD(1).Visible = True
                        cmdViewIPD(1).Visible = True
                    Else
                        chkIPD(0).Visible = False
                        chkIPD(0) = 0
                        'Call chkIPD_Click   'Had to call this since setting to 0 did not cause click event
                        cmdViewIPD(0).Visible = False
                        chkIPD(1).Visible = False
                        chkIPD(1) = 0
                        'Call chkIPD_Click   'Had to call this since setting to 0 did not cause click event
                        cmdViewIPD(1).Visible = False
                    End If
                End With
                frmEmail.fraEmail(0).Visible = True
                frmEmail.fraEmail(1).Visible = False
                fraSpecial(4).Visible = False
                fraSpecial(5).Visible = False
                fraSpecial(6).Visible = False
            End If
        'US Domestic
        Else
            'Ground
            If Left(f1274, 2) = "92" Then
                fraSpecial(0).Visible = False
                fraSpecial(1).Visible = True
                fraSpecial(2).Visible = False
                fraSpecial(3).Visible = False
                frmEmail.fraEmail(0).Visible = False
                frmEmail.fraEmail(1).Visible = True
                fraSpecial(4).Visible = False
                fraSpecial(5).Visible = False
                fraSpecial(6).Visible = False
            'FHD
            ElseIf Left(f1274, 2) = "90" Then
                fraSpecial(0).Visible = False
                fraSpecial(1).Visible = False
                fraSpecial(2).Visible = True
                fraSpecial(3).Visible = False
                frmEmail.fraEmail(0).Visible = False
                frmEmail.fraEmail(1).Visible = True
                fraSpecial(4).Visible = False
                fraSpecial(5).Visible = False
                fraSpecial(6).Visible = False
            'Express
            Else
                fraSpecial(0).Visible = True
                fraSpecial(1).Visible = False
                fraSpecial(2).Visible = False
                fraSpecial(3).Visible = False
                frmEmail.fraEmail(0).Visible = True
                frmEmail.fraEmail(1).Visible = False
                fraSpecial(4).Visible = False
                fraSpecial(5).Visible = False
                fraSpecial(6).Visible = False
            End If
        End If
    'CA
    Else
        'CA Export
        If Left(f50, 2) <> "CA" Then
            fraSpecial(0).Visible = False
            fraSpecial(1).Visible = False
            fraSpecial(2).Visible = False
            fraSpecial(3).Visible = False
            frmEmail.fraEmail(0).Visible = True
            frmEmail.fraEmail(1).Visible = False
            fraSpecial(4).Visible = False
            fraSpecial(5).Visible = False
            fraSpecial(6).Visible = True
        Else
            'Intra CA Ground
            If Left(f1274, 2) = "92" Then
                fraSpecial(0).Visible = False
                fraSpecial(1).Visible = False
                fraSpecial(2).Visible = False
                fraSpecial(3).Visible = False
                frmEmail.fraEmail(0).Visible = False
                frmEmail.fraEmail(1).Visible = True
                fraSpecial(4).Visible = True
                fraSpecial(5).Visible = False
                fraSpecial(6).Visible = False
            'Intra CA Express
            Else
                fraSpecial(0).Visible = False
                fraSpecial(1).Visible = False
                fraSpecial(2).Visible = False
                fraSpecial(3).Visible = False
                frmEmail.fraEmail(0).Visible = True
                frmEmail.fraEmail(1).Visible = False
                fraSpecial(4).Visible = False
                fraSpecial(5).Visible = True
                fraSpecial(6).Visible = False
            End If
        End If
    End If
    
    Exit Sub
EH:
     MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Module    : CalcTotalWgt
' DateTime  : 3/16/2004
' Modified  : 11/18/2004 - Fixed problem in formatting
' Modified  : 02/21/2005 -  Removed Format function with RoundUp to correct total weight
'             on International tab
' Author    : Chris Elwell
' Purpose   : Calculate the total weight for a commodity
' Call from : f82_LostFocus() and txtCommodityWgt_LostFocus()
'---------------------------------------------------------------------------------------
'
Private Sub CalcTotalWgt()
    Dim strTemp As String
    
    On Error GoTo EH
    g_strErrorLocation = "frmShip:CalcTotalWgt"
    
    If f82 <> "" And txtCommodityWgt <> "" Then
        strTemp = Format(Str(Val(f82) * Val(txtCommodityWgt)), "##0.00")
        
        If f75 = "LBS" Then
                f77 = RoundUp(strTemp)
        ElseIf f75 = "KGS" Then
                f77 = Format(strTemp, "##0.0")
        End If
    End If
    
    Exit Sub
EH:
     MsgBox Err.Description, vbCritical, g_strErrorLocation
End Sub
'---------------------------------------------------------------------------------------
' Module    : UpdateShipmentsGrid
' DateTime  : 3/17/2004
' Modified  : 8/10/2004
' Changes   : Added changes to queries to account for Puerto Rico
' Author    : Chris Elwell
' Purpose   : Load Shipments into lstTransactions on Shipped List tab.
' Call from : ChangeStatusToDelete, SSTab1_Click, txtShipDate_LostFocus
'
'
' 2005-08-18, JFW, Search field becomes "like" operator.
' 2005-08-28, JFW, Allow for blank date.
'---------------------------------------------------------------------------------------
'
Private Sub UpdateShipmentsGrid(Optional ByVal strField As String, Optional ByVal strValue As String, Optional ByVal strSortField As String, Optional ByVal strDirection As String)
    Dim rsQuery As String
    Dim i As Integer
    Dim strShipment As String
    Dim strStatus As String
    Dim strHeading As String
    Dim strAcctNum As String
    Dim rsAcctNum As New ADODB.Recordset
    Dim strFieldTag As String
    
    On Error GoTo EH
    g_strErrorLocation = "frmShip:UpdateShipmentsGrid"
    
    If optStatus(0) Then
        strStatus = "Shipped"
        If optType(2) Then
            strHeading = "Total Shipments: "
        ElseIf optType(3) Then
            strHeading = "Total IPD CRNs: "
        Else
            strHeading = "Total Packages: "
        End If
    Else
        strStatus = "Deleted"
        strHeading = "Total Deleted: "
    End If
    
    'Get acct# for query
    If cboLocationName(1) = frmSetup.cboName Then
        strAcctNum = frmSetup.f10
    Else
        rsQuery = "SELECT f10 FROM Meters WHERE Name = " & SingleQuotes(cboLocationName(1))
        rsAcctNum.Open rsQuery, g_connFSMSClient, adOpenKeyset, adLockOptimistic
        If Not rsAcctNum.EOF Then
            strAcctNum = rsAcctNum!f10
        End If
        rsAcctNum.Close
    End If
    'Convert strField to actual field name in Shipments table of FSMSClient.mdb
    If strField <> "" Then
        strFieldTag = GridCaptionToFieldName(strField)
    End If
    'If Sort field is blank set to tracking number else convert to fieldname
    If strSortField = "" Then
        strSortField = "g_str29"
    Else
        strSortField = GridCaptionToFieldName(strSortField)
    End If
    
    'If Sort direction is blank set to DESC
    If strDirection = "" Then
        strDirection = "DESC"
    End If
    
    If optType(1) Then
        'Build Ground query
        rsQuery = "SELECT g_str29,g_str25,g_str3056,g_str3057,g_str11,g_str12,"
        rsQuery = rsQuery + "g_str13,g_str15,g_str16,g_str17"
        rsQuery = rsQuery + " FROM Shipments WHERE Status = " & SingleQuotes(strStatus)
        rsQuery = rsQuery + " AND g_str10 = " & SingleQuotes(strAcctNum)
        If IsDate(txtShipDate & "") Then
            rsQuery = rsQuery + " AND g_str24 = " & SingleQuotes(Format(CDate(txtShipDate & ""), "YYYYMMDD"))
        End If
        rsQuery = rsQuery + " AND (g_str1274 = '90' OR g_str1274 = '92')"
        If strFieldTag <> "" Then
            rsQuery = rsQuery + " AND " & strFieldTag & " like " & SingleQuotes("%" & strValue & "%")
        End If
        rsQuery = rsQuery + " ORDER BY " & strSortField & " " & strDirection
        lblShipmentsView = "FedEx Ground and Home Delivery"
    ElseIf optType(2) Then
        'Build Int'l Express Query - modified 8/10 for PR
        rsQuery = "SELECT g_str29,g_str25,g_str116,g_str11,g_str12,"
        rsQuery = rsQuery + "g_str13,g_str15,g_str16,g_str17"
        rsQuery = rsQuery + " FROM Shipments WHERE Status = " & SingleQuotes(strStatus)
        rsQuery = rsQuery + " AND g_str10 = " & SingleQuotes(strAcctNum)
        If IsDate(txtShipDate & "") Then
            rsQuery = rsQuery + " AND g_str24 = " & SingleQuotes(Format(CDate(txtShipDate & ""), "YYYYMMDD"))
        End If
        'Modified 3/16/05 to show US Export or CA Export
        If g_str117 = "US" Then
            rsQuery = rsQuery + " AND (g_str50 <> 'US' OR g_str16 = 'PR')"
        Else
            rsQuery = rsQuery + " AND g_str50 <> 'CA'"
        End If
        If strFieldTag <> "" Then
            rsQuery = rsQuery + " AND " & strFieldTag & " like " & SingleQuotes("%" & strValue & "%")
        End If
        rsQuery = rsQuery + " ORDER BY " & strSortField & " " & strDirection
        lblShipmentsView = "FedEx International Express"
    ElseIf optType(3) Then
        'Build IPD Query
        rsQuery = "SELECT g_str29,g_str25,g_str1123,g_str1355,IPDStatus,g_str11,"
        rsQuery = rsQuery + "g_str12,g_str13,g_str15,g_str16,g_str17,g_str50"
        rsQuery = rsQuery + " FROM IPD WHERE Status = " & SingleQuotes(strStatus)
        rsQuery = rsQuery + " AND g_str10 = " & SingleQuotes(strAcctNum)
        If IsDate(txtShipDate & "") Then
            rsQuery = rsQuery + " AND g_str24 = " & SingleQuotes(txtShipDate)
        End If
        rsQuery = rsQuery + " AND MAWB <> 1"
        If strFieldTag <> "" Then
            rsQuery = rsQuery + " AND " & strFieldTag & " like " & SingleQuotes("%" & strValue & "%")
        End If
        rsQuery = rsQuery + " ORDER BY " & strSortField & " " & strDirection
        lblShipmentsView = "FedEx Express IPD"
    Else
        'Build Domestic Express Query - modified 8/10 for PR
        rsQuery = "SELECT g_str29,g_str25,g_str11,g_str12,"
        rsQuery = rsQuery + "g_str13,g_str15,g_str16,g_str17"
        rsQuery = rsQuery + " FROM Shipments WHERE Status = " & SingleQuotes(strStatus)
        rsQuery = rsQuery + " AND g_str10 = " & SingleQuotes(strAcctNum)
        If IsDate(txtShipDate & "") Then
            rsQuery = rsQuery + " AND g_str24 = " & SingleQuotes(Format(CDate(txtShipDate & ""), "YYYYMMDD"))
        End If
        rsQuery = rsQuery + " AND g_str1274 <> '90' AND g_str1274 <> '92'"
        'Modified 3/16/05 to show US Domestic or CA Domestic
        If g_str117 = "US" Then
            rsQuery = rsQuery + " AND g_str50 = 'US' AND g_str16 <> 'PR'"
        Else
            rsQuery = rsQuery + " AND g_str50 = 'CA'"
        End If
        If strFieldTag <> "" Then
            rsQuery = rsQuery + " AND " & strFieldTag & " like " & SingleQuotes("%" & strValue & "%")
        End If
        rsQuery = rsQuery + " ORDER BY " & strSortField & " " & strDirection
        lblShipmentsView = "FedEx Domestic Express"
    End If
    
    dcShipments.ConnectionString = "DSN=FSMSClient v720.3"
    dcShipments.RecordSource = rsQuery
    dcShipments.Refresh
    
    If dcShipments.Recordset.RecordCount <= 0 Then
        If txtShipDate & "" <> "" Then
            txtShipDate.Text = ""
            Call UpdateShipmentsGrid(strField, strValue)
            Exit Sub
        End If
    End If
    
    grdShipments.Enabled = True
    
    Set grdShipments.DataSource = dcShipments
    grdShipments.Refresh
    
    If optType(0) Then
        'Set Express column headings
        grdShipments.Columns(0).Caption = "Trk #"
        grdShipments.Columns(1).Caption = "Reference"
        grdShipments.Columns(2).Caption = "Company"
        grdShipments.Columns(3).Caption = "Contact"
        grdShipments.Columns(4).Caption = "Addr1"
        grdShipments.Columns(5).Caption = "City"
        grdShipments.Columns(6).Caption = "St"
        grdShipments.Columns(7).Caption = "Zip"
    ElseIf optType(1) Then
        'Set Ground column headings
        grdShipments.Columns(0).Caption = "Trk #"
        grdShipments.Columns(1).Caption = "Reference"
        grdShipments.Columns(2).Caption = "PO #"
        grdShipments.Columns(3).Caption = "Inv #"
        grdShipments.Columns(4).Caption = "Company"
        grdShipments.Columns(5).Caption = "Contact"
        grdShipments.Columns(6).Caption = "Addr1"
        grdShipments.Columns(7).Caption = "City"
        grdShipments.Columns(8).Caption = "St"
        grdShipments.Columns(9).Caption = "Zip"
    ElseIf optType(2) Then
        'Set Express column headings
        grdShipments.Columns(0).Caption = "Trk #"
        grdShipments.Columns(1).Caption = "Reference"
        grdShipments.Columns(2).Caption = "# Pkgs"
        grdShipments.Columns(3).Caption = "Company"
        grdShipments.Columns(4).Caption = "Contact"
        grdShipments.Columns(5).Caption = "Addr1"
        grdShipments.Columns(6).Caption = "City"
        grdShipments.Columns(7).Caption = "St"
        grdShipments.Columns(8).Caption = "Zip"
    ElseIf optType(3) Then
        'Set IPD column headings
        grdShipments.Columns(0).Caption = "Trk #"
        grdShipments.Columns(1).Caption = "Reference"
        grdShipments.Columns(2).Caption = "Master Trk #"
        grdShipments.Columns(3).Caption = "IOR Facility"
        grdShipments.Columns(4).Caption = "IPD Status"
        grdShipments.Columns(5).Caption = "Company"
        grdShipments.Columns(6).Caption = "Contact"
        grdShipments.Columns(7).Caption = "Addr1"
        grdShipments.Columns(8).Caption = "City"
        grdShipments.Columns(9).Caption = "St"
        grdShipments.Columns(10).Caption = "Zip"
        grdShipments.Columns(11).Caption = "Country"
    End If
    grdShipments.Caption = strHeading & Str(dcShipments.Recordset.RecordCount)
    'If the grid is empty or Deleted Shipments are being viewed disable grid.
    If dcShipments.Recordset.RecordCount = 0 Or optStatus(1) Then
        grdShipments.Enabled = False
    End If

Release:
    If rsAcctNum.State = adStateOpen Then rsAcctNum.Close
    Set rsAcctNum = Nothing
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation
    Resume Release

End Sub
'---------------------------------------------------------------------------------------
' Module    : GridCaptionToFieldName
' DateTime  : 6/21/2004
' Author    : Chris Elwell
' Purpose   : Converts Shipping History grid captions to database field names.
' Call from :
'---------------------------------------------------------------------------------------
'
Private Function GridCaptionToFieldName(ByVal strField As String) As String
    Select Case Trim(strField)
        Case "IOR Facility"
            GridCaptionToFieldName = "g_str1355"
        Case "Trk #"
            GridCaptionToFieldName = "g_str29"
        Case "Master Trk #"
            GridCaptionToFieldName = "g_str1123"
        Case "IPD Status"
            GridCaptionToFieldName = "IPDStatus"
        Case "Reference"
            GridCaptionToFieldName = "g_str25"
        Case "PO #"
            GridCaptionToFieldName = "g_str3056"
        Case "Inv #"
            GridCaptionToFieldName = "g_str3057"
        Case "Company"
            GridCaptionToFieldName = "g_str11"
        Case "Contact"
            GridCaptionToFieldName = "g_str12"
        Case "Addr1"
            GridCaptionToFieldName = "g_str13"
        Case "City"
            GridCaptionToFieldName = "g_str15"
        Case "State"
            GridCaptionToFieldName = "g_str16"
        Case "Zip"
            GridCaptionToFieldName = "g_str17"
        Case "Country"
            GridCaptionToFieldName = "g_str50"
    End Select
End Function
'---------------------------------------------------------------------------------------
' Module    : TrackIt
' DateTime  : 4/21/2004
' Author    : Chris Elwell
' Purpose   : Tracks the passed tracking number
' Call from : TrackButton
'---------------------------------------------------------------------------------------
'
Private Sub TrackIt(ByVal strTrackNum As String)
    SSTab1.Tab = 5
    WebBrowser1.Navigate "https://www.fedex.com/cgi-bin/tracking?action=track&tracknumbers=" & strTrackNum
    StatusBar1.Panels(2) = "Tracking, please wait..."
End Sub
'---------------------------------------------------------------------------------------
' Module    : CalcTotalWgt
' DateTime  : 3/16/2004
' Author    : Chris Elwell
' Purpose   : Calculate the total weight for a commodity
' Call from : f82_LostFocus() and txtCommodityWgt_LostFocus()
'---------------------------------------------------------------------------------------
'
Public Sub TrackItRef(ByVal strRef As String, ByVal strRefType As String, ByVal strAcctNum As String)
    Dim strURL As String
    SSTab1.Tab = 5
    WebBrowser1.Navigate "https://www.fedex.com/cgi-bin/tracking?action=alttrack&reftype=" & strRefType & "&account_number=" & strAcctNum & "&tracknumbers=" & strRef
    StatusBar1.Panels(2) = "Tracking, please wait..."
End Sub
'---------------------------------------------------------------------------------------
' Module    : SaveShipment
' DateTime  : 3/17/2004
' Author    : Chris Elwell
' Purpose   : Store shipment fields to database
' Call from : g_clsParser_ParseComplete()
'---------------------------------------------------------------------------------------
'
Private Sub SaveShipment(ByVal strTrkNum As String, ByVal Index As Integer)
    
    On Error GoTo EH
    g_strErrorLocation = "frmShip:SaveShipment"
    
    Dim strInsertQuery As String
    Dim f25 As String
    Dim f3056 As String
    Dim f3057 As String
    Dim rsRefs As New ADODB.Recordset
    Dim strQuery As String
    Dim i As Integer
    
    strQuery = "SELECT g_str25, g_str3056, g_str3057 FROM MPS WHERE f1 = '" & g_str1 & "'"
    
    rsRefs.Open strQuery, g_connFSMSClient, adOpenStatic, adLockBatchOptimistic
    
    If rsRefs.EOF Then
        f25 = g_str25
        f3056 = g_str3056
        f3057 = g_str3057
    Else
        For i = 1 To Index - 1
            rsRefs.MoveNext
        Next
        f25 = rsRefs!g_str25
        f3056 = rsRefs!g_str3056
        f3057 = rsRefs!g_str3057
    End If
    
        
    strInsertQuery = "INSERT INTO Shipments VALUES("
    strInsertQuery = strInsertQuery + SingleQuotes(strTrkNum) + ","
    strInsertQuery = strInsertQuery + SingleQuotes(f25) + ","
    strInsertQuery = strInsertQuery + SingleQuotes(f3056) + ","
    strInsertQuery = strInsertQuery + SingleQuotes(f3057) + ","
    strInsertQuery = strInsertQuery + SingleQuotes(g_str11) + ","
    strInsertQuery = strInsertQuery + SingleQuotes(g_str12) + ","
    strInsertQuery = strInsertQuery + SingleQuotes(g_str13) + ","
    strInsertQuery = strInsertQuery + SingleQuotes(g_str15) + ","
    strInsertQuery = strInsertQuery + SingleQuotes(g_str16) + ","
    strInsertQuery = strInsertQuery + SingleQuotes(g_str17) + ","
    strInsertQuery = strInsertQuery + SingleQuotes(g_str50) + ","
    strInsertQuery = strInsertQuery + SingleQuotes(g_str10) + ","
    strInsertQuery = strInsertQuery + SingleQuotes(g_str1274) + ","
    strInsertQuery = strInsertQuery + SingleQuotes(g_str24) + ","
    strInsertQuery = strInsertQuery + SingleQuotes(g_str116) + ","
    strInsertQuery = strInsertQuery + "'Shipped',"
    strInsertQuery = strInsertQuery + "#" + CStr(Now) + "#)"
    
    g_connFSMSClient.Execute strInsertQuery

Release:
    If rsRefs.State = adStateOpen Then rsRefs.Close
    Set rsRefs = Nothing
    Exit Sub
EH:
     MsgBox Err.Description, vbCritical, g_strErrorLocation
     Resume Release

End Sub
'---------------------------------------------------------------------------------------
' Module    : SaveIPDShipment
' DateTime  : 3/17/2004
' Author    : Chris Elwell
' Purpose   : Store IPD shipment fields to database
' Call from : g_clsParser_ParseComplete()
'---------------------------------------------------------------------------------------
'
Private Sub SaveIPDShipment(ByVal strTrkNum As String, ByVal blnIsCreate As Boolean, Optional ByVal strMasterTrkNum As String)
    Dim strInsertQuery As String
    Dim rsf1297 As New ADODB.Recordset
    Dim strQuery As String
    
    On Error GoTo EH
    g_strErrorLocation = "frmShip:SaveIPDShipment"
        
    If Not blnIsCreate Then
        strQuery = "SELECT g_str1297 FROM IPD WHERE IPDStatus = 'Open' And g_str1355 = " & SingleQuotes(g_str1355)
        rsf1297.Open strQuery, g_connFSMSClient, adOpenStatic, adLockOptimistic
        
        g_str1297 = rsf1297!g_str1297
    End If
    
    strInsertQuery = "INSERT INTO IPD VALUES("
    strInsertQuery = strInsertQuery + SingleQuotes(g_str1297) + ","
    strInsertQuery = strInsertQuery + SingleQuotes(g_str1355) + ","
    strInsertQuery = strInsertQuery + SingleQuotes(g_str1358) + ","
    strInsertQuery = strInsertQuery + SingleQuotes("Open") + ","
    'If it's a MAWB Create, set MAWB to 1
    If blnIsCreate Then
        strInsertQuery = strInsertQuery + "1,"
        strInsertQuery = strInsertQuery + SingleQuotes(strTrkNum) + ","
        strInsertQuery = strInsertQuery + SingleQuotes(strTrkNum) + ","
    Else
        strInsertQuery = strInsertQuery + "0,"
        strInsertQuery = strInsertQuery + SingleQuotes(strTrkNum) + ","
        strInsertQuery = strInsertQuery + SingleQuotes(strMasterTrkNum) + ","
    End If
    strInsertQuery = strInsertQuery + SingleQuotes(g_str25) + ","
    strInsertQuery = strInsertQuery + SingleQuotes(g_str11) + ","
    strInsertQuery = strInsertQuery + SingleQuotes(g_str12) + ","
    strInsertQuery = strInsertQuery + SingleQuotes(g_str13) + ","
    strInsertQuery = strInsertQuery + SingleQuotes(g_str15) + ","
    strInsertQuery = strInsertQuery + SingleQuotes(g_str16) + ","
    strInsertQuery = strInsertQuery + SingleQuotes(g_str17) + ","
    strInsertQuery = strInsertQuery + SingleQuotes(g_str50) + ","
    strInsertQuery = strInsertQuery + SingleQuotes(g_str10) + ","
    strInsertQuery = strInsertQuery + SingleQuotes(frmIPDAdd.f24) + ","
    strInsertQuery = strInsertQuery + "'Shipped',"
    strInsertQuery = strInsertQuery + "#" + CStr(Now) + "#)"
    
    g_connFSMSClient.Execute strInsertQuery
    
Release:
    If rsf1297.State = adStateOpen Then rsf1297.Close
    Set rsf1297 = Nothing
    
    Exit Sub
EH:
     MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Module    : ChangeStatusToDelete
' DateTime  : 3/17/2004
' Author    : Chris Elwell
' Purpose   : Changes a package status to Deleted in the Shipments table.
' Call from : g_clsParser_ParseComplete()
'---------------------------------------------------------------------------------------
'
Private Sub ChangeStatusToDelete(ByVal strTrkNum As String)
    Dim rsQuery As String
    Dim Start As Long
    
    On Error GoTo EH
    g_strErrorLocation = "frmShip:ChangeStatusToDelete"
    
    rsQuery = "UPDATE Shipments SET [Status] = 'Deleted' WHERE g_str29 = " & SingleQuotes(strTrkNum)

    g_connFSMSClient.Execute rsQuery
    
    'This one second delay allows update to complete before query is re-run.
    If g_blnDeletesComplete Then
        Start = Timer
        Do While Timer < Start + 1
            DoEvents
        Loop
    End If
    
    Exit Sub
EH:
     MsgBox Err.Description, vbCritical, g_strErrorLocation
End Sub
'---------------------------------------------------------------------------------------
' Module    : ChangeIPDStatus
' DateTime  : 10/28/2004
' Author    : Chris Elwell
' Purpose   : Changes a IPD status to Confirmed or Deleted in the IPD table.
' Call from : g_clsParser_ParseComplete()
'---------------------------------------------------------------------------------------
'
Private Sub ChangeIPDStatus(ByVal strTrkNum As String, ByVal strStatus As String)
    Dim strQuery As String
    Dim Start As Long
    Dim rsTrkNum As New ADODB.Recordset
    
    On Error GoTo EH
    g_strErrorLocation = "frmShip:ChangeIPDStatus"
    
    strQuery = "UPDATE IPD SET [IPDStatus] = " & SingleQuotes(strStatus) & " WHERE g_str1123 = " & SingleQuotes(strTrkNum)

    g_connFSMSClient.Execute strQuery
    
    'This one second delay allows update to complete before query is re-run.
    If g_blnDeletesComplete Then
        Start = Timer
        Do While Timer < Start + 1
            DoEvents
        Loop
    End If
    
    Exit Sub
EH:
     MsgBox Err.Description, vbCritical, g_strErrorLocation
End Sub
'---------------------------------------------------------------------------------------
' Module    : ChangeCRNStatus
' DateTime  : 10/28/2004
' Author    : Chris Elwell
' Purpose   : Changes a CRN status to Deleted in the IPD table.
' Call from : g_clsParser_ParseComplete()
'---------------------------------------------------------------------------------------
'
Private Sub ChangeCRNStatus(ByVal strTrkNum As String)
    Dim rsQuery As String
    Dim Start As Long
    
    On Error GoTo EH
    g_strErrorLocation = "frmShip:ChangeCRNStatus"
    
    rsQuery = "UPDATE IPD SET [Status] = 'Deleted' WHERE g_str29 = " & SingleQuotes(strTrkNum)

    g_connFSMSClient.Execute rsQuery
    
    'This one second delay allows update to complete before query is re-run.
    If g_blnDeletesComplete Then
        Start = Timer
        Do While Timer < Start + 1
            DoEvents
        Loop
    End If
    
    Exit Sub
EH:
     MsgBox Err.Description, vbCritical, g_strErrorLocation
End Sub
'---------------------------------------------------------------------------------------
' Module    : SetLogo
' DateTime  : 5/24/2004
' Author    : Chris Elwell
' Purpose   : Sets FedEx logo baesed on Express or Ground
' Call from : f1274_Change, f1274_Click
'---------------------------------------------------------------------------------------
'
Private Sub SetLogo()
    If Left(f1274, 2) = "92" Or Left(f1274, 2) = "90" Then
        imgLogo2.Visible = True
        imgLogo1.Visible = False
    Else
        imgLogo1.Visible = True
        imgLogo2.Visible = False
    End If
End Sub
'---------------------------------------------------------------------------------------
' Module    : SetTrackButtons
' DateTime  : 5/24/2004
' Modifed   : 8/19/2004
' Change    : If fedex.com is disabled then disable trk buttons.
' Author    : Chris Elwell
' Purpose   : Enable/disable Track button on Shipping History
' Call from : grdShipments_Click, optType_Click, SSTab1_Click, g_clsParser_ParseComplete
'---------------------------------------------------------------------------------------
'
Public Sub SetTrackButtons()
    On Error GoTo EH
    
    'If Tracking button are disabled in setup or nothing is selected in the grid
    'disable buttons - 8/19 if fedex.com tab disabled, disable tracking buttons
    If grdShipments.SelBookmarks.Count <= 0 Or SSTab1.TabVisible(5) = False Then
        Call SetMenuButton(3, False)
        Call SetMenuButton(4, False)
    Else
        Call SetMenuButton(3, True)
        'If all Ground ref fields are empty, disable Track by Ref button
        If optType(1) Then
            If grdShipments.Columns(1) = "" And grdShipments.Columns(2) = "" And grdShipments.Columns(3) = "" Then
                Call SetMenuButton(4, False)
            Else
                Call SetMenuButton(4, True)
            End If
        'If ref field is empty for Express and Intl disable Track by Ref button
        ElseIf optType(0) Or optType(2) Or optType(3) Then
            If grdShipments.Columns(1) = "" Then
                Call SetMenuButton(4, False)
            Else
                Call SetMenuButton(4, True)
            End If
        End If
    End If
        
EH:
    'Do nothing
End Sub
'---------------------------------------------------------------------------------------
' Module    : LoadSearchFields
' DateTime  : 6/11/2004
' Modified  : 10/22/2004 Added IPD search fields
' Author    : Chris Elwell
' Purpose   : Load Search Field into combo on Shipping History tab.
' Call from :
'---------------------------------------------------------------------------------------
'
Private Sub LoadSearchFields(Index As Integer)
    
    On Error GoTo EH
    g_strErrorLocation = "frmShip:LoadSearchFields"
    
    cboSearchField.Clear
    'Ground
    If Index = 1 Then
        cboSearchField.AddItem "Trk #"
        cboSearchField.AddItem "Reference"
        cboSearchField.AddItem "PO #"
        cboSearchField.AddItem "Inv #"
        cboSearchField.AddItem "Company"
        cboSearchField.AddItem "Contact"
        cboSearchField.AddItem "Addr 1"
        cboSearchField.AddItem "City"
        cboSearchField.AddItem "State"
        cboSearchField.AddItem "Zip"
    'IPD
    ElseIf Index = 3 Then
        cboSearchField.AddItem "Trk #"
        cboSearchField.AddItem "Master Trk #"
        cboSearchField.AddItem "IOR Facility"
        cboSearchField.AddItem "IPD Status  "
        cboSearchField.AddItem "Reference"
        cboSearchField.AddItem "Company"
        cboSearchField.AddItem "Contact"
        cboSearchField.AddItem "Addr 1"
        cboSearchField.AddItem "City"
        cboSearchField.AddItem "State"
        cboSearchField.AddItem "Zip"
        cboSearchField.AddItem "Country"
    'Express
    Else
        cboSearchField.AddItem "Trk #"
        cboSearchField.AddItem "Reference"
        cboSearchField.AddItem "Company"
        cboSearchField.AddItem "Contact"
        cboSearchField.AddItem "Addr 1"
        cboSearchField.AddItem "City"
        cboSearchField.AddItem "State"
        cboSearchField.AddItem "Zip"
    End If
    
    cboSearchField.ListIndex = 0
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : QuoteConnect()
' DateTime  : 6/28/2004
' Purpose   : Calls the FXRSConnect method to connect the FSMSQuote control to FXRS.
'---------------------------------------------------------------------------------------
'
Public Sub QuoteConnect()
    
    On Error GoTo EH
    g_strErrorLocation = "frmShip:ServiceQuote"
    
    With frmSetup
        FSMSQuote1.FXRSConnect .cboFXRSIP, .txtFXRSPort
    End With
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : FSMSQuote1_FXRSConnected()
' DateTime  : 7/19/2004
' Purpose   : FXRSConnected event - check to see if it's an optimization or service quote
'             and call the appropriate sub.
'---------------------------------------------------------------------------------------
'
Private Sub FSMSQuote1_FXRSConnected()
    
    On Error GoTo EH
    g_strErrorLocation = "frmShip:FSMSQuote1_FXRSConnected"
    
    'g_blnDoOptimize must be set before calling QuoteConnect to perform service optimization
    If g_blnDoOptimize Then
        Call DoOptimize
    Else
        Call ServiceQuote
    End If
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation
End Sub
'---------------------------------------------------------------------------------------
' Procedure : ServiceQuote()
' DateTime  : 7/19/2004
' Purpose   : FXRSConnected event - assign input properties and call DoQuote method.
'---------------------------------------------------------------------------------------
'
Private Sub ServiceQuote()
    On Error GoTo EH
    g_strErrorLocation = "frmShip:ServiceQuote"
    
    With FSMSQuote1
        .f498 = frmSetup.f498
        ' 2005-04-11, JFW
        .f1090 = f1090
        .f8 = Left(frmSetup.f8, 2)
        .f9 = frmSetup.f9
        .f16 = Left(cboDestState, 2)
        .f17 = txtDestZip
        ' 2005-04-11, JFW
        .f50 = f50
        'Allow only single piece rating. Field 1606 does not work
        .f116 = txtNumPkgs
        .f1670 = txtWeight
        .f26 = txtDV
        .f57 = f57(1)
        .f58 = f58(1)
        .f59 = f59(1)
        If chkRES = 1 Then
            .f440 = "Y"
        Else
            .f440 = ""
        End If
        If chkSAT = 1 Then
            .f1266 = "Y"
        Else
            .f1266 = ""
        End If
        If chkCOD = 1 Then
            .f27 = "Y"
        Else
            .f27 = ""
        End If
        'Handling charge Type
        If frmSetup.f1588(1) Then
            .f1588 = "1"                    'Flat amt
        ElseIf frmSetup.f1588(2) Then
            .f1588 = "2"                    '% of freight chg
        ElseIf frmSetup.f1588(3) Then
            .f1588 = "3"                    '% of Net chg
        End If
        'All svcs have same handling chg amount
        If frmSetup.chkBySvc = 0 Then
            .F1595_PO = ImpliedDecimal(frmSetup.f1595(1))
            .F1595_SO = ImpliedDecimal(frmSetup.f1595(1))
            .F1595_ES = ImpliedDecimal(frmSetup.f1595(1))
            .F1595_XS = ImpliedDecimal(frmSetup.f1595(1))
            .F1595_GR = ImpliedDecimal(frmSetup.f1595(1))
            .F1595_HD = ImpliedDecimal(frmSetup.f1595(1))
        'All defined separately
        Else
            .F1595_PO = ImpliedDecimal(frmSetup.f1595(1))
            .F1595_SO = ImpliedDecimal(frmSetup.f1595(2))
            .F1595_ES = ImpliedDecimal(frmSetup.f1595(3))
            .F1595_XS = ImpliedDecimal(frmSetup.f1595(4))
            .F1595_GR = ImpliedDecimal(frmSetup.f1595(5))
            .F1595_HD = ImpliedDecimal(frmSetup.f1595(6))
        End If
        'Handling chg application point
        If frmSetup.f1606(0) Then
            .f1606 = "0"                    'Apply to pkg
        ElseIf frmSetup.f1606(1) Then
            .f1606 = "1"                    'Apply to shipment
        End If
        
        .f24 = f24
        
        'No optimization just service quoting
        .DoOptimize = False
        'Add Ground/FHD Special Svcs
        'Acknowledgement of Delivery
        If chkAOD = 1 Then
            .f3009 = "Y"
        Else
            .f3009 = ""
        End If
        'Auto POD
        If chkAPOD = 1 Then
            .f3008 = "Y"
        Else
            .f3008 = ""
        End If
        'Non-standard pkg
        If chkAOD = 1 Then
            .f3018 = "Y"
        Else
            .f3018 = ""
        End If
        
        'Add FHD Sig Svc
        If chkSIG = 1 Then
            .f3019 = "Y"
        Else
            .f3019 = ""
        End If
        
        'Add FHD Special Svcs
        If chkFHDSpecial(1) = 1 Then
            .f3020 = "1"
        ElseIf chkFHDSpecial(2) = 1 Then
            .f3020 = "2"
        ElseIf chkFHDSpecial(3) = 1 Then
            .f3020 = "3"
        Else
            .f3020 = ""
        End If
        
        .DoQuote
        
    End With
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation
End Sub
'---------------------------------------------------------------------------------------
' Procedure : DoOptimize()
' DateTime  : 7/19/2004
' Purpose   : Set the status bar message and pass the necessary properties to do a service
'             optimization.
'---------------------------------------------------------------------------------------
'
Private Sub DoOptimize()
    
    On Error GoTo EH
    g_strErrorLocation = "frmShip:DoOptimize"
    
    'Show message in status bar
    StatusBar1.Panels(2) = "Optimizing..."
    'Pass fields required for optimization
    With FSMSQuote1
        
        .f498 = frmSetup.f498
        ' 2005-04-11, JFW
        .f1090 = f1090
'Don't need to pass these fields
'        .f8 = frmSetup.f8
'        .f9 = frmSetup.f9
        .f16 = Left(f16, 2)
        .f17 = Left(f17, 5)
        ' 2005-04-11, JFW
        .f50 = f50
        .f1670 = f1670
        .f26 = f26
        .f57 = f57(0)
        .f58 = f58(0)
        .f59 = f59(0)
        .f440 = IIf(f440 = 1, "Y", "")
        .f1266 = IIf(f1266(0) = 1, "Y", "")
        .f27 = IIf(f27(0) = 1, "Y", "")
        .f24 = f24
        .DelDate = txtDelDate
        .DoOptimize = True
        .DoQuote
    
    End With
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : FSMSQuote1_QuoteComplete()
' DateTime  : 6/28/2004
' Purpose   : If Optimizing, call routine to display service, if Service Quote, call
'             routine to display fields on Service Quote tab.
'---------------------------------------------------------------------------------------
'
Private Sub FSMSQuote1_QuoteComplete()
    
    On Error GoTo EH
    g_strErrorLocation = "frmShip:FSMSQuote1_QuoteComplete"
    
    Call EnableButtons
    'Populate the charges fields
    
    'If true then it was an optimization else it was a service quote.
    If FSMSQuote1.DoOptimize Then
        Call DoOptimizeComplete
    Else
        Call ServiceQuoteComplete
    End If
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : ServiceQuoteComplete()
' DateTime  : 7/19/2004
' Purpose   : Display Service Quote fields on Service Quote tab.
'---------------------------------------------------------------------------------------
'
Private Sub ServiceQuoteComplete()
    Dim i As Integer
    
    On Error GoTo EH
    g_strErrorLocation = "frmShip:ServiceQuoteComplete"
    
    With FSMSQuote1
        .FXRSDisconnect
        
        Call GetDelTimes(.F33)
        'PO fields - If error returned, blank all PO fields, show error button
        If .F3_PO <> "" Then
            cmdError(1).Visible = True
            txtDelTime(1) = ""
            f37(1) = ""
            f409(1) = ""
            f1528(1) = ""
            f1596(1) = ""
            f1597(1) = ""
            f1598(1) = ""
            f1599(1) = ""
        Else
            cmdError(1).Visible = False
            f37(1) = .F37_PO
            f409(1) = .PO_Commit
            f1528(1) = .F1528_PO
            f1596(1) = .F1596_PO
            f1597(1) = .F1597_PO
            f1598(1) = .F1598_PO
            f1599(1) = .F1599_PO
        End If
        'SO fields - If error returned, blank all SO fields, show error button
        If .F3_SO <> "" Then
            cmdError(2).Visible = True
            txtDelTime(2) = ""
            f37(2) = ""
            f409(2) = ""
            f1528(2) = ""
            f1596(2) = ""
            f1597(2) = ""
            f1598(2) = ""
            f1599(2) = ""
        Else
            cmdError(2).Visible = False
            f37(2) = .F37_SO
            f409(2) = .SO_Commit
            f1528(2) = .F1528_SO
            f1596(2) = .F1596_SO
            f1597(2) = .F1597_SO
            f1598(2) = .F1598_SO
            f1599(2) = .F1599_SO
        End If
        'ES fields - If error returned, blank all ES fields, show error button
        If .F3_ES <> "" Then
            cmdError(3).Visible = True
            txtDelTime(3) = ""
            f37(3) = ""
            f409(3) = ""
            f1528(3) = ""
            f1596(3) = ""
            f1597(3) = ""
            f1598(3) = ""
            f1599(3) = ""
        Else
            cmdError(3).Visible = False
            f37(3) = .F37_ES
            f409(3) = .ES_Commit
            f1528(3) = .F1528_ES
            f1596(3) = .F1596_ES
            f1597(3) = .F1597_ES
            f1598(3) = .F1598_ES
            f1599(3) = .F1599_ES
        End If
        'XS fields - If error returned, blank all XS fields, show error button
         If .F3_XS <> "" Then
            cmdError(4).Visible = True
            txtDelTime(4) = ""
            f37(4) = ""
            f409(4) = ""
            f1528(4) = ""
            f1596(4) = ""
            f1597(4) = ""
            f1598(4) = ""
            f1599(4) = ""
        Else
            cmdError(4).Visible = False
            f37(4) = .F37_XS
            f409(4) = .XS_Commit
            f1528(4) = .F1528_XS
            f1596(4) = .F1596_XS
            f1597(4) = .F1597_XS
            f1598(4) = .F1598_XS
            f1599(4) = .F1599_XS
        End If
        'GR fields - If error returned, blank all GR fields, show error button
        If .F3_GR <> "" Then
            cmdError(5).Visible = True
            f37(5) = ""
            f409(5) = ""
            f1528(5) = ""
            f1596(5) = ""
            f1597(5) = ""
            f1598(5) = ""
            f1599(5) = ""
        Else
            cmdError(5).Visible = False
            f37(5) = .F37_GR
            f409(5) = .GR_Commit
            f1528(5) = .F1528_GR
            f1596(5) = .F1596_GR
            f1597(5) = .F1597_GR
            f1598(5) = .F1598_GR
            f1599(5) = .F1599_GR
        End If
        'HD fields - If error returned, blank all HD fields, show error button
        If .F3_HD <> "" Then
            cmdError(6).Visible = True
            f37(6) = ""
            f409(6) = ""
            f1528(6) = ""
            f1596(6) = ""
            f1597(6) = ""
            f1598(6) = ""
            f1599(6) = ""
        Else
            cmdError(6).Visible = False
            f37(6) = .F37_HD
            f409(6) = .HD_Commit
            f1528(6) = .F1528_HD
            f1596(6) = .F1596_HD
            f1597(6) = .F1597_HD
            f1598(6) = .F1598_HD
            f1599(6) = .F1599_HD
        End If
        f60(0) = .F60_Express
        f60(1) = .F60_Ground
    End With
    StatusBar1.Panels(2) = "Quote Complete!"

    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : DoOptimizeComplete()
' DateTime  : 7/19/2004
' Purpose   : Display Optimized service in f1274, show status message and set boolean to
'             False.
'---------------------------------------------------------------------------------------
'
Private Sub DoOptimizeComplete()
        
    With FSMSQuote1
        .FXRSDisconnect
        f1274 = .Optimized_Svc
    End With
    StatusBar1.Panels(2) = "Optimization Complete"
    g_blnDoOptimize = False
    
End Sub
'---------------------------------------------------------------------------------------
' Procedure : FSMSQuote1_FXRSConnectFailed()
' DateTime  : 6/28/2004
' Purpose   : FXRConnectFailed event - display an error is there is a problem connecting to
'             FXRS.
'---------------------------------------------------------------------------------------
'
Private Sub FSMSQuote1_FXRSConnectFailed()
    StatusBar1.Panels(2) = "Quote Error: Error connecting to FSMS"
End Sub
'---------------------------------------------------------------------------------------
' Procedure : FSMSQuote1_QuoteError()
' DateTime  : 6/28/2004
' Purpose   : QuoteError event - display the Optimized_Error property in the event of an error.
'---------------------------------------------------------------------------------------
'
Private Sub FSMSQuote1_QuoteError()
    MsgBox FSMSQuote1.Quote_Error, vbCritical, "Service Quote Error"
    StatusBar1.Panels(2) = "Quote Error"
    Call EnableButtons
    FSMSQuote1.FXRSDisconnect
End Sub
'---------------------------------------------------------------------------------------
' Procedure : FSMSQuote1_RatingError()
' DateTime  : 6/28/2004
' Purpose   : RatingError event - Update status bar with error
'---------------------------------------------------------------------------------------
'
Private Sub FSMSQuote1_RatingError()
    StatusBar1.Panels(2) = "Service Quote Error: " & GetRateError(FSMSQuote1.Rating_Error)
    Call EnableButtons
    FSMSQuote1.FXRSDisconnect
End Sub
'---------------------------------------------------------------------------------------
' Procedure : GetDelTimes()
' DateTime  : 6/28/2004
' Purpose   : Uses the Service Area that was returned from the FSMSQuote control and
'             does a lookup to the SA table in the FSMSClient.mdb.
'---------------------------------------------------------------------------------------
'
Private Sub GetDelTimes(ByVal strSvcArea As String)
    Dim strQuery As String
    Dim rsSA As New ADODB.Recordset
    
    On Error GoTo EH
    g_strErrorLocation = "frmShip.GetDelTimes"
    
    strQuery = "SELECT * FROM SA Where SA = " & SingleQuotes(strSvcArea)
    rsSA.Open strQuery, g_connFSMSClient, adOpenKeyset, adLockOptimistic
    
    If Not rsSA.EOF Then
        txtDelTime(1) = rsSA!PO
        txtDelTime(2) = rsSA!SO
        txtDelTime(3) = rsSA!ES
        txtDelTime(4) = rsSA!XS
    End If
    
Release:
    If rsSA.State = adStateOpen Then rsSA.Close
    Set rsSA = Nothing
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation
    Resume Release

End Sub
'---------------------------------------------------------------------------------------
' Procedure : ShowRateDetails()
' DateTime  : 6/28/2004
' Purpose   : Shows the Rate Details on the Service Quote tab when the Net or the Total
'             column is moused over.
'---------------------------------------------------------------------------------------
'
Private Sub ShowRateDetails(ByVal intIndex As Integer)
    On Error GoTo EH
    g_strErrorLocation = "frmShip.ShowRateDetails"
    
    With FSMSQuote1
        Select Case intIndex
            Case 1 'PO
                If optRate(0) Then 'Discounted rates
                    txtDetails(1) = .F34_PO
                    txtDetails(2) = .F36_PO
                    txtDetails(3) = .F35_PO
                    txtDetails(4) = .F37_PO
                    txtDetails(5) = .F1596_PO
                    txtDetails(6) = .F1598_PO
                Else 'List Rates
                    txtDetails(1) = .F1519_PO
                    txtDetails(2) = ""
                    txtDetails(3) = .F1507_PO
                    txtDetails(4) = .F1528_PO
                    txtDetails(5) = .F1597_PO
                    txtDetails(6) = .F1599_PO
                End If
            Case 2 'SO
                If optRate(0) Then 'Discounted rates
                    txtDetails(1) = .F34_SO
                    txtDetails(2) = .F36_SO
                    txtDetails(3) = .F35_SO
                    txtDetails(4) = .F37_SO
                    txtDetails(5) = .F1596_SO
                    txtDetails(6) = .F1598_SO
                Else 'List Rates
                    txtDetails(1) = .F1519_SO
                    txtDetails(2) = ""
                    txtDetails(3) = .F1507_SO
                    txtDetails(4) = .F1528_SO
                    txtDetails(5) = .F1597_SO
                    txtDetails(6) = .F1599_SO
                End If
            Case 3 'ES
                If optRate(0) Then 'Discounted rates
                    txtDetails(1) = .F34_ES
                    txtDetails(2) = .F36_ES
                    txtDetails(3) = .F35_ES
                    txtDetails(4) = .F37_ES
                    txtDetails(5) = .F1596_ES
                    txtDetails(6) = .F1598_ES
                Else 'List Rates
                    txtDetails(1) = .F1519_ES
                    txtDetails(2) = ""
                    txtDetails(3) = .F1507_ES
                    txtDetails(4) = .F1528_ES
                    txtDetails(5) = .F1597_ES
                    txtDetails(6) = .F1599_ES
                End If
            Case 4 'XS
                If optRate(0) Then 'Discounted rates
                    txtDetails(1) = .F34_XS
                    txtDetails(2) = .F36_XS
                    txtDetails(3) = .F35_XS
                    txtDetails(4) = .F37_XS
                    txtDetails(5) = .F1596_XS
                    txtDetails(6) = .F1598_XS
                Else 'List Rates
                    txtDetails(1) = .F1519_XS
                    txtDetails(2) = ""
                    txtDetails(3) = .F1507_XS
                    txtDetails(4) = .F1528_XS
                    txtDetails(5) = .F1597_XS
                    txtDetails(6) = .F1599_XS
                End If
            Case 5 'GR
                If optRate(0) Then 'Discounted rates
                    txtDetails(1) = .F34_GR
                    txtDetails(2) = .F36_GR
                    txtDetails(3) = .F35_GR
                    txtDetails(4) = .F37_GR
                    txtDetails(5) = .F1596_GR
                    txtDetails(6) = .F1598_GR
                Else 'List Rates
                    txtDetails(1) = .F1519_GR
                    txtDetails(2) = ""
                    txtDetails(3) = .F1507_GR
                    txtDetails(4) = .F1528_GR
                    txtDetails(5) = .F1597_GR
                    txtDetails(6) = .F1599_GR
                End If
            Case 6 'HD
                If optRate(0) Then 'Discounted rates
                    txtDetails(1) = .F34_HD
                    txtDetails(2) = .F36_HD
                    txtDetails(3) = .F35_HD
                    txtDetails(4) = .F37_HD
                    txtDetails(5) = .F1596_HD
                    txtDetails(6) = .F1598_HD
                Else 'List Rates
                    txtDetails(1) = .F1519_HD
                    txtDetails(2) = ""
                    txtDetails(3) = .F1507_HD
                    txtDetails(4) = .F1528_HD
                    txtDetails(5) = .F1597_HD
                    txtDetails(6) = .F1599_HD
                End If
        End Select
        
    End With
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation
End Sub
'---------------------------------------------------------------------------------------
' Procedure : ClearRateDetails()
' DateTime  : 6/28/2004
' Purpose   : Clears the fields on the Service Quote tab under the Rate Details heading.
'---------------------------------------------------------------------------------------
'
Private Sub ClearRateDetails()
    txtDetails(1) = ""
    txtDetails(2) = ""
    txtDetails(3) = ""
    txtDetails(4) = ""
    txtDetails(5) = ""
    txtDetails(6) = ""
End Sub
'---------------------------------------------------------------------------------------
' Procedure : ClearBatchTab()
' DateTime  : 6/28/2004
' Purpose   : Clears the fields on the Batch tab.
'---------------------------------------------------------------------------------------
'
Private Sub ClearBatchTab()
    lstErrorTransactions.Clear
    txtTotalRecords = ""
    txtNumShipped = ""
    txtNumErrors = ""
End Sub
'---------------------------------------------------------------------------------------
' Procedure : ClearServiceQuoteTab()
' DateTime  : 6/28/2004
' Purpose   : Clears the input fields on the ServiceQuote tab.
'---------------------------------------------------------------------------------------
'
Private Sub ClearServiceQuoteTab()
    Dim i As Integer
    
    On Error GoTo EH
    g_strErrorLocation = "frmShip.ClearServiceQuoteTab"
    
    'Clear the Rates and Delivery Commitments fields
    For i = 1 To 6
        f37(i) = ""
        f1528(i) = ""
        f1596(i) = ""
        f1597(i) = ""
        f1598(i) = ""
        f1599(i) = ""
        f409(i) = ""
        cmdError(i).Visible = False
        txtDetails(i) = ""
    Next
    'Clear the commitment time field
    For i = 1 To 4
        txtDelTime(i) = ""
    Next
    
    'Clear Billed Weight fields
    f60(0) = ""
    f60(1) = ""
    'Clear the Shipment properties fields
    cboDestState = ""
    txtDestZip = ""
    txtWeight = ""
    txtDV = ""
    f57(1) = ""
    f58(1) = ""
    f59(1) = ""
    cboBoxName(1) = ""
    'Special Svcs
    chkSAT = 0
    chkCOD = 0
    chkRES = 0
    'Ground/FHD Special
    chkAOD = 0
    chkAPOD = 0
    chkNonSP = 0
    'FHD Special
    chkSIG = 0
    chkFHDSpecial(1) = 0
    chkFHDSpecial(2) = 0
    chkFHDSpecial(3) = 0
    'Set # of Pkgs to 1
    txtNumPkgs = "1"
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : SetMenuButton()
' DateTime  : 7/1/2004
' Purpose   : Enables/disables menu buttons and sets color.
'---------------------------------------------------------------------------------------
'
Public Sub SetMenuButton(Index As Integer, blnEnable As Boolean)
    If frmSetup.chkDisableButton(Index) = 0 And blnEnable Then
        cmdMenu(Index).Enabled = True
        cmdMenu(Index).BackColor = &HC0E0FF
    Else
        cmdMenu(Index).Enabled = False
        cmdMenu(Index).BackColor = &HE0E0E0
    End If
End Sub
'---------------------------------------------------------------------------------------
' Procedure : ClearHistoryTab()
' DateTime  : 7/27/2004
' Purpose   : Clears the Search Value then updates the grid.
'---------------------------------------------------------------------------------------
'
Private Sub ClearHistoryTab()

    txtSearchValue = ""
    Call UpdateShipmentsGrid

End Sub
'---------------------------------------------------------------------------------------
' Procedure : ToggleLookup()
' DateTime  : 8/30/2004
' Purpose   : Called from Form_Keyup if CTRL-A is pressed it switched back and forth
'             between Order ID and Cust ID lookup.
'---------------------------------------------------------------------------------------
'
Private Sub ToggleLookup()
    
    On Error GoTo EH
    g_strErrorLocation = "frmShip:ToggleLookup"
    
    App.LogEvent "ToggleLookup, f1.Visible " & CStr(f1.Visible)
    
    'Call ClearButton to clear before toggling
    Call cmdMenu_Click(0)
    
    If f1.Visible Then
        f1.Visible = False
        f11.Visible = False
        f12.Visible = False
        cboCustID.Visible = True
        cboContact.Visible = True
        cboCompany.Visible = True
        Call LoadAddrLookupCombos(cboCustID, cboCustID, "CustID")
        Call LoadAddrLookupCombos(cboContact, cboContact, "f12")
        Call LoadAddrLookupCombos(cboCompany, cboCompany, "f11")
        Label1(1) = "Customer ID:"
        Label1(1).FontBold = True
        cboCustID.SetFocus
        chkAddAddress.Visible = True
    Else
        f1.Visible = True
        f11.Visible = True
        f12.Visible = True
        cboCustID.Visible = False
        cboContact.Visible = False
        cboCompany.Visible = False
        Label1(1) = "Order ID:"
        Label1(1).FontBold = False
        f1.SetFocus
        chkAddAddress.Visible = False
    End If

    ' 2005-08-18, JFW
    Call g_clsReg.SetRegistryValue("LookupCustID", CStr(Not f1.Visible), REG_SZ)
    
    App.LogEvent "ToggleLookup, done, f1.Visible " & CStr(f1.Visible)
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : ToggleDepartment()
' DateTime  : 2/10/2005
' Purpose   : Called from Form_Keyup if CTRL-A is pressed it switched back and forth
'             between Order ID and Cust ID lookup.
'---------------------------------------------------------------------------------------
'
Private Sub ToggleDepartment()
    
    On Error GoTo EH
    g_strErrorLocation = "frmShip:ToggleDepartment"
    
    'If text field is visible, hide it and show combo
    If f38.Visible Then
        f38.Visible = False
        cboDept.Visible = True
        Call LoadDeptCombo(f38)
    'Else hide combo and show text field
    Else
        f38.Visible = True
        cboDept.Visible = False
    End If

    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : LoadCustIDCombo()
' DateTime  : 8/31/2004
' Purpose   : Load Box names in to DIM combos on frmShip, frmMPS
' Call from :
'---------------------------------------------------------------------------------------
'
Public Sub LoadCustIDCombo()
    Dim rsCustID As New ADODB.Recordset
    
    On Error GoTo EH
    g_strErrorLocation = "frmShip:LoadCustIDCombo"
    
    rsCustID.Open "SELECT CustID FROM AddressBook", g_connFSMSClient, adOpenStatic, adLockOptimistic
    If Not rsCustID.EOF Then
        cboCustID.Clear
        Do Until rsCustID.EOF
            cboCustID.AddItem rsCustID!CustID
            rsCustID.MoveNext
        Loop
    End If

Release:
    If rsCustID.State = adStateOpen Then rsCustID.Close
    Set rsCustID = Nothing
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation
    Resume Release

End Sub
'---------------------------------------------------------------------------------------
' Procedure : LoadAddrLookupCombos()
' DateTime  : 8/31/2004
' Purpose   : Loads Customer ID, Contact, and Company combos. Pass combo name and
'             lookup field.
' Call from :
'---------------------------------------------------------------------------------------
'
Public Sub LoadAddrLookupCombos(ByRef MyCombo As ComboBox, ByVal strSelected As String, Optional ByVal strLookupFld As String)
    
    Dim rsAddrField As New ADODB.Recordset
    Dim strQuery As String
    
    On Error GoTo EH
    g_strErrorLocation = "frmShip:LoadAddrLookupCombos"
    
    strQuery = "SELECT " & strLookupFld & " FROM AddressBook ORDER BY " & strLookupFld & " ASC"
    
    rsAddrField.Open strQuery, g_connFSMSClient, adOpenStatic, adLockOptimistic
    If Not rsAddrField.EOF Then
        MyCombo.Clear
        Do Until rsAddrField.EOF
            MyCombo.AddItem rsAddrField.Fields(0)
            rsAddrField.MoveNext
        Loop
    End If
    
    MyCombo = strSelected

Release:
    If rsAddrField.State = adStateOpen Then rsAddrField.Close
    Set rsAddrField = Nothing
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation
    Resume Release

End Sub
'---------------------------------------------------------------------------------------
' Procedure : LoadDeptCombo()
' DateTime  : 2/10/2005
' Purpose   : Loads Department combo
' Call from :
'---------------------------------------------------------------------------------------
'
Public Sub LoadDeptCombo(ByVal strSelected As String)
    Dim rsDept As New ADODB.Recordset
    
    On Error GoTo EH
    g_strErrorLocation = "frmShip:LoadDeptCombo"
    
    rsDept.Open "SELECT * FROM Departments ORDER BY Department ASC", g_connFSMSClient, adOpenStatic, adLockOptimistic
    If Not rsDept.EOF Then
        cboDept.Clear
        Do Until rsDept.EOF
            cboDept.AddItem rsDept.Fields(0)
            rsDept.MoveNext
        Loop
    End If
    
    cboDept = strSelected

Release:
    If rsDept.State = adStateOpen Then rsDept.Close
    Set rsDept = Nothing
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation
    Resume Release

End Sub
'---------------------------------------------------------------------------------------
' Procedure : LoadAddrFields()
' DateTime  : 8/31/2004
' Purpose   : Loads recipient info onto Ship form
' Call from :
'---------------------------------------------------------------------------------------
'
Private Sub LoadAddrFields(ByVal strLookupFld As String, ByVal strValue As String)
    On Error GoTo EH
    g_strErrorLocation = "frmShip:LoadAddrFields"
    
    Dim strQuery As String
    Dim rsCustomer As New ADODB.Recordset
    
    'Show buttons requiring Order IDs
    If cboCustID <> "" Then
        cmdMPS.Enabled = True
        If optCommodities Then
            cmdAddToShipment.Enabled = True
        End If
    Else
        cmdMPS.Enabled = False
        cmdAddToShipment.Enabled = False
    End If
    
    strQuery = "SELECT * FROM AddressBook WHERE " & strLookupFld & " = " & SingleQuotes(strValue)
    rsCustomer.Open strQuery, g_connFSMSClient, adOpenKeyset, adLockOptimistic
    If Not rsCustomer.EOF Then
        cboCustID = rsCustomer!CustID
        f1 = rsCustomer!CustID
        f50 = rsCustomer!f50
        cboCompany = rsCustomer!f11
        cboContact = rsCustomer!f12
        f11 = rsCustomer!f11
        f12 = rsCustomer!f12
        f13 = rsCustomer!f13
        f14 = rsCustomer!f14
        f15 = rsCustomer!f15
        f16 = rsCustomer!f16
        f17 = rsCustomer!f17
        f18 = rsCustomer!f18
        f23 = rsCustomer!f23
        f20 = rsCustomer!f20
        frmEmail.f1202(0) = rsCustomer!f1202
        frmEmail.f1202(1) = rsCustomer!f1202
        
        ' 2005-08-24, JFW, AddressBook EIN.
        f1358 = rsCustomer!f118 & ""
                
        chkAddAddress.Caption = "Update Address Book"
        cboCustID.SetFocus
    Else
        chkAddAddress.Caption = "Add To Address Book"
    End If
    
Release:
    If rsCustomer.State = adStateOpen Then rsCustomer.Close
    Set rsCustomer = Nothing
    Exit Sub

EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation
    Resume Release

End Sub
'---------------------------------------------------------------------------------------
' Procedure : SaveAddress
' DateTime  : 8/31/2004
' Purpose   : Add or update Address in AddressBook table
' Call from :
'---------------------------------------------------------------------------------------
'
Public Sub SaveAddress(ByVal strCustID As String)
    
    On Error GoTo EH
    g_strErrorLocation = "frmShip:SaveAddress"
    
    Dim rsAddress As New ADODB.Recordset
    Dim strQuery As String
    
    'If the CustID is empty exit
    If strCustID = "" Then Exit Sub
        
    strQuery = "SELECT CustID FROM AddressBook WHERE CustID = " & SingleQuotes(strCustID)
    rsAddress.Open strQuery, g_connFSMSClient, adOpenStatic, adLockOptimistic
    
    If rsAddress.EOF Then
        strQuery = "INSERT INTO AddressBook VALUES ("
        strQuery = strQuery + SingleQuotes(strCustID) + ","
        strQuery = strQuery + SingleQuotes(cboCompany) + ","
        strQuery = strQuery + SingleQuotes(cboContact) + ","
        strQuery = strQuery + SingleQuotes(f13) + ","
        strQuery = strQuery + SingleQuotes(f14) + ","
        strQuery = strQuery + SingleQuotes(f15) + ","
        strQuery = strQuery + SingleQuotes(Left(f16, 2)) + ","
        strQuery = strQuery + SingleQuotes(f17) + ","
        strQuery = strQuery + SingleQuotes(Left(f50, 2)) + ","
        strQuery = strQuery + SingleQuotes(f18) + ","
        strQuery = strQuery + SingleQuotes(Left(f23, 1)) + ","
        strQuery = strQuery + SingleQuotes(f20) + ","
        
        strQuery = strQuery + SingleQuotes(frmEmail.f1202(0)) + ","
        ' 2005-08-24, JFW, AddressBook EIN.
        strQuery = strQuery + SingleQuotes(f1358) + ")"
                
        g_connFSMSClient.Execute strQuery
    Else
        strQuery = "UPDATE AddressBook SET [CustID] = " + SingleQuotes(strCustID) + ","
        strQuery = strQuery + "[f11] = " + SingleQuotes(cboCompany) + ","
        strQuery = strQuery + "[f12] = " + SingleQuotes(cboContact) + ","
        strQuery = strQuery + "[f13] = " + SingleQuotes(f13) + ","
        strQuery = strQuery + "[f14] = " + SingleQuotes(f14) + ","
        strQuery = strQuery + "[f15] = " + SingleQuotes(f15) + ","
        strQuery = strQuery + "[f16] = " + SingleQuotes(Left(f16, 2)) + ","
        strQuery = strQuery + "[f17] = " + SingleQuotes(f17) + ","
        strQuery = strQuery + "[f50] = " + SingleQuotes(Left(f50, 2)) + ","
        strQuery = strQuery + "[f18] = " + SingleQuotes(f18) + ","
        strQuery = strQuery + "[f23] = " + SingleQuotes(Left(f23, 1)) + ","
        strQuery = strQuery + "[f20] = " + SingleQuotes(f20) + ","
        
        strQuery = strQuery + "[f1202] = " + SingleQuotes(frmEmail.f1202(0)) + ","
        ' 2005-08-24, JFW, AddressBook EIN.
        strQuery = strQuery + "[f118] = " + SingleQuotes(f1358)
                
        strQuery = strQuery + " WHERE CustID = " + SingleQuotes(strCustID)
        g_connFSMSClient.Execute strQuery
    End If
    
Release:

    If rsAddress.State = adStateOpen Then rsAddress.Close
    Set rsAddress = Nothing
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation
    Resume Release

End Sub
'---------------------------------------------------------------------------------------
' Procedure : LoadPaymentTypeCombo
' DateTime  : 9/15/2004
' Modifed   : 11/12/2004 Added code to save current value
' Purpose   : Loads the payment types for Ground/FHD or Express
' Call from : f1274_Click
'---------------------------------------------------------------------------------------
'
Private Sub LoadPaymentTypeCombo(ByVal strCurrentValue As String)
    
    On Error GoTo EH
    g_strErrorLocation = "frmShip:LoadPaymentTypeCombo"
    
    Dim i As Integer
    
    f23.Clear
    If Left(f1274, 2) = "92" Or Left(f1274, 2) = "90" Then
        f23.AddItem "1 - Prepaid"
        f23.AddItem "2 - Collect (Not COD)"
        f23.AddItem "3 - Bill 3rd Party"
        f23.AddItem "5 - Bill Recipient"
    Else
        f23.AddItem "1 - Bill Shipper"
        f23.AddItem "2 - Bill Recipient"
        f23.AddItem "3 - Bill 3rd Party"
    End If
    
    For i = 0 To f23.ListCount - 1
        If Left(strCurrentValue, 1) = Left(f23.List(i), 1) Then
            f23 = strCurrentValue
            Exit For
        End If
    Next
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : LoadIORCombo
' DateTime  : 10/28/2004
' Purpose   : Loads the Open IPD Facilities for the current account
' Call from : chkIPD_Click
'---------------------------------------------------------------------------------------
'
Public Sub LoadIORCombo(ByVal strAcctNum As String, ByVal strShipDate As String)
    
    Dim rsIOR As New ADODB.Recordset
    Dim strQuery As String
    
    On Error GoTo EH
    g_strErrorLocation = "frmShip:LoadIORCombo"
    
    strQuery = "SELECT g_str1355 FROM IPD WHERE g_str10 = " & SingleQuotes(strAcctNum)
    strQuery = strQuery + " And g_str24 = #" + strShipDate + "#"
    strQuery = strQuery + " And IPDStatus = 'Open'"
    
    rsIOR.Open strQuery, g_connFSMSClient, adOpenStatic, adLockOptimistic
    f1355.Clear
    Do Until rsIOR.EOF
        f1355.AddItem rsIOR.Fields(0)
        rsIOR.MoveNext
    Loop
    f1355.ListIndex = IIf(f1355.ListCount > 0, 0, -1)

Release:
    If rsIOR.State = adStateOpen Then rsIOR.Close
    Set rsIOR = Nothing
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation
    Resume Release

    
End Sub
'---------------------------------------------------------------------------------------
' Procedure : FSMSClientMDBConnect
' DateTime  : 12/8/2004
' Purpose   : Connects to FSMSClient.mdb and returns True if successful.
' Call from : Form_Load
'---------------------------------------------------------------------------------------
'
Private Function FSMSClientMDBConnect() As Boolean
    On Error GoTo EH
    
    g_connFSMSClient.Open "DSN=FSMSClient v720.3"
    
    FSMSClientMDBConnect = True
    
    Exit Function
EH:
    
    FSMSClientMDBConnect = False
    
End Function
'---------------------------------------------------------------------------------------
' Procedure : AddDSN
' DateTime  : 2/8/2005
' Purpose   : Adds the FSMSClient v720.3 DSN
' Call from : Form_Load
'---------------------------------------------------------------------------------------
'
Private Function AddDSN() As Boolean
    On Error GoTo EH
    
    Dim ret As Long
    Dim Driver As String
    Dim Attributes As String
    
    Driver = "Microsoft Access Driver (*.mdb)"
    Attributes = Attributes & "DBQ=" & App.Path & "\FSMSClient.mdb" & Chr(0)
    Attributes = Attributes & "DSN=FSMSClient v720.3" & Chr(0)
    Attributes = Attributes & "DESCRIPTION=FSMS Client Automatic DSN Creation" & Chr(0)

  
    ret = SQLConfigDataSource(0, 4, Driver, Attributes)
   
    If ret <> 1 Then
        AddDSN = False
    Else
        AddDSN = True
    End If

    Exit Function
EH:
    AddDSN = False

End Function
